Does Swing work with Kaffe?

Archie Cobbs archie at
Tue Mar 14 12:01:29 PST 2000

Neumann, Matthew C writes:
> I've gotten kaffe to run a "hello world" app for me, but I'm not having any
> luck getting it to work with Swing.  It looks like it's looking for some
> defaults it can't find; how can I set those explictly so that this'll work?
> Simple code:
> ewsh08:.m/kaffe> cat
> import javax.swing.*;
> class HelloWorldAppSwing {
>         public static void main (String args[]) {
>                 JOptionPane.showMessageDialog(null,"Hello World!","hello,
> world", JOptionPane.INFORMATION_MESSAGE);
>         }
> }
> I'm on an HP-UX v10 OS, BTW.
> This is the crash message I get:
> ewsh08:.m/kaffe> bin/java HelloWorldAppSwing  
> java.lang.IllegalMonitorStateException
>         at javax.swing.UIDefaults.get(
>         at javax.swing.MultiUIDefaults.get(

For what it's worth.. I get a different exception with the
current kaffe CVS:

  $ kaffe HelloWorldAppSwing
  warning: running 1.2 version of SwingUtilities
  java.lang.NoSuchMethodError: java/awt/Component.getComponentOrientation()Ljava/awt/ComponentOrientation;
	  at javax.swing.SwingUtilities.layoutCompoundLabel(
	  at javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(
	  at javax.swing.plaf.basic.BasicButtonUI.getPreferredSize(
	  at javax.swing.plaf.basic.BasicButtonUI.getMinimumSize(
	  at javax.swing.JComponent.getMinimumSize(
	  at javax.swing.plaf.basic.BasicOptionPaneUI.addButtonComponents(
	  at javax.swing.plaf.basic.BasicOptionPaneUI.createButtonArea(
	  at javax.swing.plaf.basic.BasicOptionPaneUI.installComponents(
	  at javax.swing.plaf.basic.BasicOptionPaneUI.installUI(
	  at javax.swing.JComponent.setUI(
	  at javax.swing.JOptionPane.setUI(
	  at javax.swing.JOptionPane.updateUI(
	  at javax.swing.JOptionPane.<init>(
	  at javax.swing.JOptionPane.showOptionDialog(
	  at javax.swing.JOptionPane.showMessageDialog(
	  at javax.swing.JOptionPane.showMessageDialog(
	  at HelloWorldAppSwing.main(


Archie Cobbs   *   Whistle Communications, Inc.  *

More information about the kaffe mailing list