Fuzzy Logic

Because things aren't confusing enough…

rainbow

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: , , ,

17 Responses to “Tip: Fix Java not finding libmawt.so (Ubuntu 8.10)”

  1. January 7th, 2009 at 11:21 am

    Olivia says:

    oy! thanks :)

  2. March 6th, 2009 at 3:48 pm

    Shaun says:

    Cheers! :D

  3. March 22nd, 2009 at 11:07 pm

    Joe P says:

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

    Thanks!

  4. April 4th, 2009 at 3:41 pm

    jinquan says:

    thank u very much

  5. May 14th, 2009 at 2:40 am

    Ömer YILDIRIM says:

    Thank you very much.

  6. May 25th, 2009 at 2:24 pm

    Henry says:

    Thank you very much!

  7. June 3rd, 2009 at 10:02 am

    bijan says:

    Thanks a lot! that worked for me too.

  8. June 4th, 2009 at 2:10 pm

    Mrinmaya says:

    Thanks!

  9. September 2nd, 2009 at 12:16 am

    Saxywolf says:

    Thanks!

  10. January 21st, 2010 at 6:50 am

    Rayman Preet Singh says:

    Thanks mate !

  11. February 11th, 2010 at 12:03 pm

    Alette says:

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

  12. July 15th, 2010 at 1:52 pm

    EJ says:

    thank you very much!

    now i can start playing with my arduino :)

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

  14. July 15th, 2010 at 1:52 pm

    Aelueve says:

    Great !! Thank you very much !!

  15. July 15th, 2010 at 1:52 pm

    Anton says:

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

  16. July 15th, 2010 at 1:52 pm

    Gouldy says:

    Thanks :D

  17. July 15th, 2010 at 1:52 pm

    sharkie says:

    THX

Leave a Reply