Getting error: Cannot load AWT toolkit

Help
2007-05-08
2013-06-06
  • Amit Tendulkar
    Amit Tendulkar
    2007-05-08

    I am running ubuntu 7.04 (Feisty Fawn) on my laptop. I downloaded the stendhal-FULL-0.59.zip and issued the command as specified in the README. However I got the following error. What is wrong?

    $ java -jar stendhal-0.59.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 java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(libgcj.so.70)
       at java.awt.Window.<init>(libgcj.so.70)
       at java.awt.Frame.<init>(libgcj.so.70)
       at java.awt.Frame.<init>(libgcj.so.70)
       at javax.swing.SwingUtilities$OwnerFrame.<init>(libgcj.so.70)
       at javax.swing.SwingUtilities.getOwnerFrame(libgcj.so.70)
       at javax.swing.JOptionPane.<clinit>(libgcj.so.70)
       at java.lang.Class.initializeClass(libgcj.so.70)
       at games.stendhal.client.update.Starter.main(Starter.java:37)
    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)
       ...9 more

     
    • Amit Tendulkar
      Amit Tendulkar
      2007-05-08

      Issue resolved after installing libgcj-awt package from the synaptic package manager. After starting I got a dialog box saying I have java 1.4 and I need to install java 1.5.0. However, after clicking 'ok' I could see the initial screen. I tried 'create account' and login to server buttons, but the connection to server times out (no message is displayed but the progress bar reaches to the end and disappears). I am behind a proxy. Will that be a problem?

       
    • There are two problems:
      1. The last time we tested it, Stendhal did not work on gjc  but required Sun's Java. But that was some time ago and may have changed.
      2. The port 32160 must be accessable in a transparent way (Support for a http proxy is pending for 0.61) It is possible to use a simple port forwarding like ssh -L or rinetd.

       


Anonymous


Cancel   Add attachments