I am trying to use JNI calls to C library in UNIX environment. I tried to run a simple hello world application using
java -Djava.library.path=. com.code.jni.Hello
I have the "libHello_JNI.so" library in the current directory. But why is it still complaining
Exception in thread "Main Thread" java.lang.UnsatisfiedLinkError: no Hello_JNI in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at com.fedex.jni.Hello.<clinit>(Hello.java:6)
I have tried setting the LD_LIBRARY_PATH to the directory containing "libHello_JNI.so". Even that did not work !!
Can anyone help me ?