LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-22-2003, 08:23 AM   #1
Kavinjka
LQ Newbie
 
Registered: Aug 2003
Posts: 4

Rep: Reputation: 0
Unhappy UnsatisfiedLinkError on JNI access to Shared Library


Trying to do a simple JNI based "Hello World" demo of a Java class calling a c++ shared library on Linux (Knoppix/Debian) and keep getting

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

I've tried all of the obvious things like:

export LD_LIBRARY_PATH=/home/user/librarypath

puting libName.so in /usr/local/lib and usr/lib

putting the java class and libName.so in the same directory.

Java 1.4.1, Knoppix 3.2

Any thoughts appreciated.

MikeC....

 
Old 08-25-2003, 06:08 AM   #2
Kavinjka
LQ Newbie
 
Registered: Aug 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Problem solved (thanks to http://www.mindspring.com/~david.dagon/jni/Native.txt)

Java/Linux prepends lib and appends .so to the LoadLibrary call. Use LoadLibrary("Hello"); to load libHello.so.

MikeC....
 
  


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
JAVA JNI program to access shared library sabliny Programming 3 11-17-2005 05:13 PM
Where can I get every shared library at? Balkman Linux - General 2 08-28-2004 10:56 PM
help shared library jingle_mj Linux - Newbie 1 08-13-2004 04:36 PM
help shared library jingle_mj Linux - General 1 08-13-2004 03:11 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:08 AM.

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