Help answer threads with 0 replies.
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 05-22-2011, 03:02 AM   #1
LQ Newbie
Registered: May 2011
Posts: 27

Rep: Reputation: Disabled
How to set classpath in linux ubuntu

I want to execute .jar file in linux (ubuntu) server but I found the following error

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.load0(
at java.lang.System.load(
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.loadLibrary0(
at java.lang.System.loadLibrary(
at Method)
at java.awt.Toolkit.loadLibraries(
at java.awt.Toolkit.<clinit>(
at java.awt.Component.<clinit>(
at Server.InfiniteChatServer.<init>(

I think I have to set the classpath first. If i am right please tell me how to set classpath otherwise you can suggest me what is the problem???
Old 05-22-2011, 05:00 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,049

Rep: Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459
Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/
Not classpath : This is about "file not found", or not usable.

Please check your java with this command : 'java --version'. is present, when openjdk-6-jre is installed :
32bits : /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/
64bits : /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/xawt/
Or 'sun-java6-jre' ...
32bits : /usr/lib/jvm/java-6-sun-1.6.0.xx/jre/lib/i386/headless/
64bits : /usr/lib/jvm/java-6-sun-1.6.0.xx/jre/lib/amd64/xawt/

Setting up your java version :
'sudo update-alternatives --config java'.

May be the package 'sun-java6-jre' will work ? ? Which jar file is it about ?
And which Ubuntu version ? 64bits ?


Last edited by knudfl; 05-22-2011 at 05:07 AM.
Old 05-22-2011, 11:35 PM   #3
LQ Newbie
Registered: May 2011
Posts: 27

Original Poster
Rep: Reputation: Disabled
Yes...It works...
I just set the classpath and run XManager(passive).....and jar file executes..


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
How to set CLASSPATH srinivasmiriyalu Solaris / OpenSolaris 7 08-16-2009 09:59 AM
how to set CLASSPATH mohama Programming 8 12-17-2005 03:17 AM
How to set CLASSPATH of java in Linux? vanhelsing Programming 1 08-23-2004 06:16 AM
set classpath in linux(slackware9) for java Manjula.S Linux - Software 1 10-16-2003 02:10 AM
set up path,classpath in linux(slaware9) for java Manjula.S Linux - Software 5 10-06-2003 11:38 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:08 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