Fuzzy Logic

Because things aren't confusing enough…

Monday, December 1, 2008

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…

posted by Jason Young at 3:09 pm  

19 Comments »

  1. oy! thanks :)

    Comment by Olivia — January 7, 2009 @ 11:21 am

  2. Cheers! :D

    Comment by Shaun — March 6, 2009 @ 3:48 pm

  3. “more for yourself than anyone else”? not likely, you helped me out greatly!

    Thanks!

    Comment by Joe P — March 22, 2009 @ 11:07 pm

  4. thank u very much

    Comment by jinquan — April 4, 2009 @ 3:41 pm

  5. Thank you very much.

    Comment by Ömer YILDIRIM — May 14, 2009 @ 2:40 am

  6. Thank you very much!

    Comment by Henry — May 25, 2009 @ 2:24 pm

  7. Thanks a lot! that worked for me too.

    Comment by bijan — June 3, 2009 @ 10:02 am

  8. Thanks!

    Comment by Mrinmaya — June 4, 2009 @ 2:10 pm

  9. Thanks!

    Comment by Saxywolf — September 2, 2009 @ 12:16 am

  10. Thanks mate !

    Comment by Rayman Preet Singh — January 21, 2010 @ 6:50 am

  11. Thanks!! Now I can look at particles crashing in ATLAS (atlas.ch) almost realtime :) Yeah!

    Comment by Alette — February 11, 2010 @ 12:03 pm

  12. thank you very much!

    now i can start playing with my arduino :)

    Comment by EJ — July 15, 2010 @ 1:52 pm

  13. [...] 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/ [...]

    Pingback by tip: benerin Java yang ndak nemuin library ‘libmawt.so’ « Joko Antonio — July 15, 2010 @ 1:52 pm

  14. Great !! Thank you very much !!

    Comment by Aelueve — July 15, 2010 @ 1:52 pm

  15. Good catch. Issues like this are why OpenJDK is not ready for prime time. It simply can’t run too many existing Java apps.

    Comment by Anton — July 15, 2010 @ 1:52 pm

  16. Thanks :D

    Comment by Gouldy — July 15, 2010 @ 1:52 pm

  17. THX

    Comment by sharkie — July 15, 2010 @ 1:52 pm

  18. You are a life saver. Many thanks.

    Comment by evilbooger — August 4, 2010 @ 1:09 am

  19. Even after 3 yrs this information is still useful! Thank you!

    Comment by Mark W. — September 21, 2011 @ 8:54 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress