[kaffe] Problems using Swing "--without-classpath-gtk-awt"

Dalibor Topic robilad at kaffe.org
Mon Jan 31 05:31:04 PST 2005

davide.bonfanti at bticino.it wrote:
> I would like to use Kaffe on an arm-based board.
> I downloaded Kaffe CVS version a pair of weeks ago.

Ciao davide!

> I cross-compiled Kaffe with my toolchain and tried using both qte and X
> obtaining the same Error while using Swing (everithing seams to be OK with
> AWT):
> java.lang.NoSuchMethodError:
> java/awt/EventQueue.invokeLater(Ljava/lang/Runnable;)V
>    at javax.swing.SwingUtilities.invokeLater (SwingUtilities.java:785)
>    at javax.swing.RepaintManager.addInvalidComponent
> (RepaintManager.java:275)
>    at javax.swing.JComponent.revalidate (JComponent.java:1894)
>    at javax.swing.JComponent.setOpaque (JComponent.java:2124)
>    at javax.swing.JPanel.<init> (JPanel.java:83)
>    at javax.swing.JPanel.<init> (JPanel.java:58)
>    at javax.swing.JRootPane.createGlassPane (JRootPane.java:521)
>    at javax.swing.JRootPane.getGlassPane (JRootPane.java:432)
>    at javax.swing.JRootPane.<init> (JRootPane.java:484)
>    at javax.swing.JFrame.createRootPane (JFrame.java:137)
>    at javax.swing.JFrame.getRootPane (JFrame.java:122)
>    at javax.swing.JFrame.frameInit (JFrame.java:86)
>    at javax.swing.JFrame.<init> (JFrame.java:79)
>    at ButtonDemo.createAndShowGUI (ButtonDemo.java:100)
>    at ButtonDemo.main (ButtonDemo.java:123)
> In effect in
> .../libraries/javalib/awt-implementations/kaffe/java/awt/EventQueue.java
> there isn't invokeLater method ...

Yeah. You could try to merge EventQueue.invokeLater from GNU Classpath 
in, or the whole class.

> Where am I wrong? Am I forced to use gtk?

The Kaffe-awt (what you are using) is an peerless AWT implementation 
which doesn't inlcude Swing, it only supports swing using Sun's non-free 
Swing111.jar. As you have seen, it would need to be a bit updated to 
work with Classpath's swing. Such patches would be most welcome!

The classpath AWT implementation uses peers, so a good deal of the 
internal design is a bit different. Ideally, someone should write a 
wrapper around the peerless AWT backends in Kaffe that would make them 
useable from within Classpath, or port them to the peer-based 
architecture of GNU Classpath. I've CC:ed James and Stephane, who tried 
to do that for the Xlib and Qt peers.

dalibor topic

More information about the kaffe mailing list