Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 08-22-2003, 09:23 AM   #1
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 in /usr/local/lib and usr/lib

putting the java class and in the same directory.

Java 1.4.1, Knoppix 3.2

Any thoughts appreciated.


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

Original Poster
Rep: Reputation: 0
Problem solved (thanks to

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



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

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

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