LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 10: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, 04:09 PM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
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, 10: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, 09: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, 03: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 04:47 PM.
 
  


Reply



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 07:38 AM
error while loading shared library bonniehandi Linux - Newbie 2 11-18-2005 11:43 PM
MAndrake 10 library problem : error while loading shared libraries falojah Linux - Software 13 09-22-2005 06:18 AM
kmodule: error while loading shared library libc.so.6 gruell Fedora - Installation 2 08-04-2005 09:24 AM
Error when trying to install java runtime library downinthemine Linux - Newbie 5 07-31-2003 02:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:17 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
Open Source Consulting | Domain Registration