LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-30-2005, 11:53 AM   #1
trutnev
Member
 
Registered: Sep 2003
Distribution: RedHat 9.0, Mandrake 9.1
Posts: 68

Rep: Reputation: 15
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.
 
Old 05-30-2005, 05:09 PM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
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
 
Old 05-31-2005, 11:26 PM   #3
trutnev
Member
 
Registered: Sep 2003
Distribution: RedHat 9.0, Mandrake 9.1
Posts: 68

Original Poster
Rep: Reputation: 15
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.
 
Old 06-01-2005, 10:24 AM   #4
csfalcon
Member
 
Registered: Jun 2004
Location: MD
Distribution: Fedora Core
Posts: 269

Rep: Reputation: 31
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>
 
Old 06-01-2005, 04:33 PM   #5
trutnev
Member
 
Registered: Sep 2003
Distribution: RedHat 9.0, Mandrake 9.1
Posts: 68

Original Poster
Rep: Reputation: 15
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

Last edited by trutnev; 06-01-2005 at 05:47 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while loading shared library : libpng12.so.0 dhanilshah Linux - Software 5 08-18-2011 08:38 AM
error while loading shared library bonniehandi Linux - Newbie 2 11-19-2005 12:43 AM
MAndrake 10 library problem : error while loading shared libraries falojah Linux - Software 13 09-22-2005 07:18 AM
kmodule: error while loading shared library libc.so.6 gruell Fedora - Installation 2 08-04-2005 10:24 AM
Error when trying to install java runtime library downinthemine Linux - Newbie 5 07-31-2003 03:49 AM


All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration