Visit Jeremy's Blog.
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, 06:27 AM   #1
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 17.04
Posts: 307

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, 10: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 06:20 AM.
Old 12-16-2008, 12:49 PM   #3
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 17.04
Posts: 307

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, 01:12 PM   #4
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
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, 12:26 PM   #5
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,755

Rep: Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329Reputation: 3329
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 12:29 PM.



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

All times are GMT -5. The time now is 05:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration