UnsatisfiedLinkError: no <lib> in java.library.path
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bruce_Crawford
Posted On:   Friday, September 13, 2002 06:07 PM

This exception is fairly common, but in this case I think I've covered the bases pretty well with no success. Is it possible to get this exception when the .so is found, but may have unseen internal problems? I have done 'nm' on the .so file and verified that the JNI methods are there. In the JNI Java file I've printed out the contents of java.library.path just prior to the System.loadLibrary() call so I can guarantee what is there. And the directory where my .so file resides is there. I've tried setting LD_LIBRARY_PATH ... I've tried using -Djava.library.path=... I've tried copying the .so into many directories I've tried running the java class from diff   More>>

This exception is fairly common, but in this case I think I've covered the bases pretty well with no success.
Is it possible to get this exception when the .so is found, but may have unseen internal problems?
I have done 'nm' on the .so file and verified that the JNI methods are there.


In the JNI Java file I've printed out the contents of java.library.path just prior to the System.loadLibrary() call so I can guarantee what is there.


And the directory where my .so file resides is there.


I've tried setting LD_LIBRARY_PATH ...
I've tried using -Djava.library.path=...
I've tried copying the .so into many directories
I've tried running the java class from different directories


Any insight from the forum?

Thanks


Note: using SDK 1.4 on RedHat Linux 7.3 with gnu g++

   <<Less

Re: UnsatisfiedLinkError: no &lt;lib&gt; in java.library.path

Posted By:   Alexander_Krapf  
Posted On:   Monday, September 23, 2002 02:30 PM

Bruce,


Also check for libraries that this library depends on. If another library needs to be loaded when this library is being loaded and that other library is absent, you would get the same error.


Regards,


Alex

Re: UnsatisfiedLinkError: no &lt;lib&gt; in java.library.path

Posted By:   amit_gupta  
Posted On:   Monday, September 16, 2002 04:57 AM


Hi,
I hope u must have chked that u have built ur .so file correctly. I mean while making the .so file u must have given the -h option on gCC to name that .so file, and also chk for the name too since JNI by default loads the library lib.so file when u issue the loadLibrary()command





Regards,

Amit

About | Sitemap | Contact