Java AWT does not work on feisty out of the box

Bug #77719 reported by Arthur Peters
This bug report is a duplicate of:  Bug #90380: Cannot load AWT toolkit. Edit Remove
4
Affects Status Importance Assigned to Milestone
gcj-4.1 (Ubuntu)
Incomplete
Undecided
Tom Mortimer-Jones

Bug Description

Binary package hint: gij-4.1

I am trying to run 2 java programs off of sourceforge (pcgen and jreepad). Both fail with errors related to AWT.

Installing libgcj7-awt solves the problem, but AWT is very common so perhaps the package should be installed by default.

$ java -jar Jreepad-1.5.1.jar
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
   at jreepad.JreepadViewer.<clinit>(JreepadViewer.java:223)
   at java.lang.Class.initializeClass(libgcj.so.70)
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot open shared object file: No such file or directory
   at java.lang.Runtime._load(libgcj.so.70)
   at java.lang.Runtime.loadLibrary(libgcj.so.70)
   at java.lang.System.loadLibrary(libgcj.so.70)
   at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(libgcj.so.70)
   at java.lang.Class.initializeClass(libgcj.so.70)
   at java.lang.Class.forName(libgcj.so.70)
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
   ...2 more

$ bash -x pcgen.sh
++ dirname pcgen.sh
+ cd .
+ pcgendir=/home/amp/.pcgen
+ '[' '!' -d /home/amp/.pcgen ']'
+ '[' x = x ']'
+ case "$WINDOWMANAGER" in
+ BROWSER=netscape
+ javaargs='-Xms128m -Xmx256m'
+ pcgenargs=
+ whosearg=java
+ '[' x '!=' x ']'
+ exec java -DBROWSER=netscape -Xms128m -Xmx256m -jar ./pcgen.jar
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
   at pcgen.util.Logging.<clinit>(Logging.java:34)
   at java.lang.Class.initializeClass(libgcj.so.70)
   at pcgen.core.Main.dieWithBadEntryPoint(Main.java:102)
   at pcgen.core.Main.main(Main.java:95)
Caused by: java.lang.NoClassDefFoundError: gnu.java.awt.peer.gtk.GtkToolkit
   at java.lang.Class.initializeClass(libgcj.so.70)
   at java.lang.Class.forName(libgcj.so.70)
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
   ...4 more

PS: The programs fail to run even with the AWT package installed. Both with Null pointer deref exceptions.

Revision history for this message
Tom Mortimer-Jones (tom-morty) wrote :

Thanks for the bug report.

If you download software from other sources (such as SourceForge) then you will need to locate the dependencies in order to run them. I am glad that you managed to locate the correct library in order to run these applications. The packages installed by default by Ubuntu are deliberately kept to a minimum so that the distribution can fit on a single CD. It would not be possible to install all of the libraries to run even the most popular software without becoming far to big to fit on a CD.

If you are still having trouble with these applications and you believe that it is a problem with an Ubuntu library please post some more information. If you think that the problem is with the application then the developers of these applications will be able to help you.

Changed in gcj-4.1:
assignee: nobody → tom-morty
status: Unconfirmed → Needs Info
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.