LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   error loading dynamic library with Java (http://www.linuxquestions.org/questions/programming-9/error-loading-dynamic-library-with-java-328557/)

trutnev 05-30-2005 10:53 AM

error loading dynamic library with Java
 
Hello,

after compiling a dynamic library "test.so", i run java code loading that libarry and i get this message

Exception in thread "main" java.lang.UnsatisfiedLinkError: no test in java.library.path

i guess i should install test.so somewhere, but how and where.

thank you.

jonaskoelker 05-30-2005 04:09 PM

which java compiler are you using? Which VM?

obviously test.so should be installed in java.library.path, so examine that value (i.e. printf it).

hth --Jonas

trutnev 05-31-2005 10:26 PM

it is 1.4.2_04 version (java -version). what do you mean - whar VM ? I'm very new to Java.

should i access java.library.path from C (because of printf). how can i do it.

csfalcon 06-01-2005 09:24 AM

you need to add the path to the "test.so" to your LD_LIBRARY_PATH environment variable.

Code:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path to test.so>

trutnev 06-01-2005 03:33 PM

it doesn't work. i also install my so in /usr/local/lib with /sbin/ldconfig. the same error


but for instance, i use "load()" function instead of "loadLibrary()". it loads the file and it is ok.


thanks anyway


All times are GMT -5. The time now is 07:56 AM.