LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-22-2011, 04:02 AM   #1
ankit.pandey3
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/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1649)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1667)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1614)
at java.awt.Toolkit.<clinit>(Toolkit.java:1636)
at java.awt.Component.<clinit>(Component.java:572)
at Server.InfiniteChatServer.<init>(InfiniteChatServer.java:42)


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, 06:00 AM   #2
knudfl
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
Quote:
Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
Not classpath : This is about "file not found", or not usable.

Please check your java with this command : 'java --version'.

libmawt.so is present, when openjdk-6-jre is installed :
32bits : /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
64bits : /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/xawt/libmawt.so
Or 'sun-java6-jre' ...
32bits : /usr/lib/jvm/java-6-sun-1.6.0.xx/jre/lib/i386/headless/libmawt.so
64bits : /usr/lib/jvm/java-6-sun-1.6.0.xx/jre/lib/amd64/xawt/libmawt.so

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 06:07 AM.
 
Old 05-23-2011, 12:35 AM   #3
ankit.pandey3
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..
 
  


Reply


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 10:59 AM
how to set CLASSPATH mohama Programming 8 12-17-2005 04:17 AM
How to set CLASSPATH of java in Linux? vanhelsing Programming 1 08-23-2004 07:16 AM
set classpath in linux(slackware9) for java Manjula.S Linux - Software 1 10-16-2003 03:10 AM
set up path,classpath in linux(slaware9) for java Manjula.S Linux - Software 5 10-07-2003 12:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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