Tip: Fix Java not finding libmawt.so (Ubuntu 8.10)
Just a quick fix for this problem–I’m more posting this for myself than anyone else. Anyhow, if you have at one point installed the non-official Java package and then installed the sun-java6-jre package set, you may be missing some things. The error I was getting was
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
The exact error being:
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:1666) 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:1767) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1684) 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:1610) at java.awt.Toolkit.<clinit>(Toolkit.java:1632) at java.awt.Component.<clinit>(Component.java:568) at CreditSystem.main(CreditSystem.java:17)
The solution I found was to issue the following command
sudo update-java-alternatives -s java-6-sun
That will update your files and fix it. Fun fun…
Tags: Fix, Java, Swing, Ubuntu
This entry was posted on Monday, December 1st, 2008 at 3:09 pm and is filed under Linux, Tip. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
January 7th, 2009 at 11:21 am
oy! thanks
March 6th, 2009 at 3:48 pm
Cheers!
March 22nd, 2009 at 11:07 pm
“more for yourself than anyone else”? not likely, you helped me out greatly!
Thanks!
April 4th, 2009 at 3:41 pm
thank u very much
May 14th, 2009 at 2:40 am
Thank you very much.
May 25th, 2009 at 2:24 pm
Thank you very much!
June 3rd, 2009 at 10:02 am
Thanks a lot! that worked for me too.
June 4th, 2009 at 2:10 pm
Thanks!
September 2nd, 2009 at 12:16 am
Thanks!
January 21st, 2010 at 6:50 am
Thanks mate !
February 11th, 2010 at 12:03 pm
Thanks!! Now I can look at particles crashing in ATLAS (atlas.ch) almost realtime
Yeah!
July 15th, 2010 at 1:52 pm
thank you very much!
now i can start playing with my arduino
July 15th, 2010 at 1:52 pm
tip: benerin Java yang ndak nemuin library ‘libmawt.so’ « Joko Antonio says:[...] dan ane nemuin artikel yang berjudul Tip: Fix Java not finding libmawt.so (Ubuntu 8.10), dengan alamat : http://www.thetacticalnuke.com/2008/12/tip-fix-java-not-finding-libmawtso-ubuntu-810/comment-page-1/ [...]
July 15th, 2010 at 1:52 pm
Great !! Thank you very much !!
July 15th, 2010 at 1:52 pm
Good catch. Issues like this are why OpenJDK is not ready for prime time. It simply can’t run too many existing Java apps.
July 15th, 2010 at 1:52 pm
Thanks
July 15th, 2010 at 1:52 pm
THX