Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.UnsatisfiedLinkError: no HelloWorldImp in java.library.path

843829Apr 2 2007 — edited Jul 17 2007
Hello,

I have written a small C function to display HelloWorld message. I am calling the C function from a java program through JNI.

The program is working fine under HP UX 11.11 system. But the program is not working under HP-UX11.23(v2).
Could you please let us know why this is happening?

Please find the steps I followed in detail:
i) a sample java class with a native method declaration
ii) a C function which displays HelloWorld message
iii) compiled the java file
iv) generated header file with javah tool
v) compiled the C function
vi) created the shared library

Note: The same steps are being followed in both the machines

Compiling options:
/usr/bin/cc -Ae u4 -D_HPUX -c DA1.1 +z -I. -I/opt/java1.4/include -I/opt/java1.4/include/hp-ux HelloWorldImp.c HelloWorldImp.o

command used to create shared library:
/usr/bin/ld -b -o ./libHelloWorldImp.sl ./HelloWorldImp.o

vii) exported SHLIB_PATH

Any help in this regard will be more helpful.

Please let us know in case of any change in compiler options. Please let me know in case of any questions.

Thanks and Regards,
Jnanprasad
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2007
Added on Apr 2 2007
6 comments
145 views