Re: gcj 4.4 and AWT toolkit

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
ffileppo wrote:
> Hi guys,
> 
> I'm getting the following exception when I try to run AWT/SWING code using gcj 4.4 (which is using classpath 0.97.2). This is happening on both x86 and arm. It works fine using gcc 4.3
> 
> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
>    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
>    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
>    at java.awt.Window.<init>(Window.java:133)
>    at java.awt.Frame.<init>(Frame.java:246)
>    at javax.swing.JFrame.<init>(JFrame.java:123)
>    at MainPanel.main(AWT)
> Caused by: java.lang.UnsatisfiedLinkError: initIDs
>    at gnu.java.awt.peer.gtk.GtkToolkit.initIDs(GtkToolkit.java:137)
>    at gnu.java.awt.peer.gtk.GtkToolkit.initializeGlobalIDs(GtkToolkit.java:168)
>    at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(GtkToolkit.java:183)
>    at java.lang.Class.initializeClass(natClass.cc:780)
>    at java.lang.Class.forName(Class.h:742)
>    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
>    ...5 more
> 
> Any thoughts or idea?

You didn't build it?  --enable-java-awt=gtk  ?

Andrew.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.