Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-16-2008, 05:27 AM   #1
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 293

Rep: Reputation: 25

When trying to launch an application I get a java.lang.UnsatisfiedLinkError: no <libname> in java.library.path

I've put export LD_LIBRARY_PATH= statements in the .bash_profile of the user I'm logged in as and in /etc/profile
but when I type 'echo $LD_LIBRARY_PATH' at the command line I get a blank line returned. The last line of the 'set' command output where the LD_LIBRARY_PATH output is reads:
_=<path to jar file I want to execute>
although I have only specified paths to directories not individual files in the LD_LIBRARY_PATH

When I execute the jar file from the command line with the -Djava.library.path= specified as an argument I get a different (but I think unrelated error) Can anyone shed some light on this?
Old 12-16-2008, 09:03 AM   #2
Registered: Jul 2007
Posts: 72

Rep: Reputation: 16
I hope you have relogged in after you put this in the profile files.
They are read only on login.
If they still dont work export it from the command prompt like this:

export LD_LIBRARY_PATH=/xxx/yyy

and then echo it once to check.
This should work

--Ukesh Upendran

Last edited by uks; 07-24-2009 at 05:20 AM.
Old 12-16-2008, 11:49 AM   #3
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 293

Original Poster
Rep: Reputation: 25
I've changed the /etc/profile and the user's and root's .bashrc to contain:
LD_LIBRARY_PATH=/usr/ofed/lib:<other colon-seperated entries here>


and yes, I have been logging out and in again for the changes to take affect. For some reason, though, launching the jar file from command line doesn't give me this problem but executing the same command from a launcher on the desktop (I'm using RHEL 4) does.
Old 12-16-2008, 12:12 PM   #4
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,737

Rep: Reputation: 262Reputation: 262Reputation: 262
You can make the library universally available with the ldconfig command. Log in as root and add the library to the /etc/ file. Then run the ldconfig command as root. See:

man ldconfig

Steve Stites
Old 12-17-2008, 11:26 AM   #5
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153Reputation: 3153
A jar file cannot be run directly from a Desktop Entry.

Make a shell script with your java -jar command ..
cd <path-to-jar-file>
exec java -jar file.jar
Name the script, make it executable, cp the script to

Now you can call the script from a Desktop Entry with
exec=scriptname .

Last edited by knudfl; 12-17-2008 at 11:29 AM.



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
Ld_library_path newbie_adm Linux - Newbie 2 08-30-2006 08:52 AM
Permanently Set a Export Setting (LD_LIBRARY_PATH) nistelrooy Linux - General 1 11-25-2004 11:33 AM
Ld_library_path fng_#1 Linux - Software 4 09-19-2004 11:33 PM
setting LD_LIBRARY_PATH JonyKyte Linux - Newbie 1 02-14-2004 12:26 PM
Ld_library_path ? dahmad Linux - Newbie 5 02-21-2003 11:08 PM

All times are GMT -5. The time now is 06:16 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration