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!

Desperate "UnsatisfiedLinkError" on Linux

843829Feb 24 2003 — edited Feb 27 2003
Hi, The Sun Java Native1.1 HelloWorld example was running well on my Windows 2000. But when I tried it on my Linux (redhat 7.3) , it has the
java.lang.UnsatisfiedLinkError: displayHelloWorld.

Use" nm libHello.so"

I can see
"000006f0 T Java_HelloWorld_displayHelloWorld"

Obviously, the library but the function could be loaded. (LD_LIBRARY_PATH was correctly set)

I used
gcc -I /usr/java/jdk1.3.1_07/include/ -I /usr/java/jdk1.3.1_07/include/linux/ -fPIC -shared -o libHello.so HelloWorldImp.c
to build the shared library.

So far I have tried various shared library builds, System.load(), even tried changing the name from "displayHelloWorld" to "Java_HelloWorld_displayHelloWorld" in the java file but in vain.

Please help!

Alex
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2003
Added on Feb 24 2003
2 comments
218 views