Desperate "UnsatisfiedLinkError" on Linux
843829Feb 24 2003 — edited Feb 27 2003Hi, 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