1834645 Members
3205 Online
110069 Solutions
New Discussion

HP UX JNI PROBLEM

 
Adityavikram
Occasional Contributor

HP UX JNI PROBLEM

--------------------------------------------------------------------------------
Hi,

I am facing a typical problem with JNI code on HP UX 10.20 First of all I installed RW with shared library options. And then I compile the native code using the following syntax -
aCC -v +time -DRW_NO_BOOL +DAportable -I/opt/java/include/ -I/opt/java/include/hp-ux/ -c +z HelloWorldImp.c -b -o libhello.sl
Now when I invoke the java program it bombs - saying cannot find class hello...

But if I had to do
aCC -v +time -DRW_NO_BOOL +DAportable -I/opt/java/include/ -I/opt/java/include/hp-ux/ -c +z HelloWorldImp.c and then link on my own using ld -b -o libhello.sl HelloWorldImpl.sl , then it works fine. I would like to know why is this happening. Am I to set some environment variable ? Please help