I am trying to run a java application that interfaces with native code. So i am using JNI, and the IDE is Eclipse.
I copied the .so files to /lib and to /usr/lib folder. But when running the java application from Eclipse it gives the ‘Unsatisfied link error’, . But in Linux the same this is running cool.
Please help me
Thanks in advance
add the path of your shared lib to LD_LIBRARY_PATH
In the LD_LIBRARY_PATH /lib as well as /usr/lib alreay there .
I guess you compiled your .so under QNX6 and not just copied from Linux!!
Plus you are complying with JNI conventions.
try to place your .so file in current directory and start your application as:
j9 -Djava.library.path=. <your_application_class>
If this does not work then check what you call in
Note: let’s say you load System.loadLibrary(“my_library”);
then compiled file should have the name: libmy_library.so
I tried with the commad
j9 -Djava.library.path=. <your_application_class> .
Still it is not working .
i have given asd in System.loadLibrary() and libasd.so is there in the current directory
It gives java.lang.UnsatisfiedLinkError : asd (unresolved symbol)
Should i set any environment variable (for eg CLASSPATH)
j9 -cp:<path_where_asd_so_resides> <your_application>