[kaffe] swing support in kaffe

Praveen Kumar praveen.k08 at samsung.com
Wed Oct 11 05:00:25 PDT 2006


hello,

I am trying to run swing examples with kaffe+nanox but it is giving
error as:

java.lang.NoSuchMethodError: java/awt/Toolkit.addAWTEventListener(Ljava/awt/event/AWTEventListener;J)V
   at javax.swing.JPanel.<init> (JPanel.java:109)
   at javax.swing.JPanel.<init> (JPanel.java:85)
   at javax.swing.JRootPane.createGlassPane (JRootPane.java:567)
   at javax.swing.JRootPane.getGlassPane (JRootPane.java:474)
   at javax.swing.JRootPane.<init> (JRootPane.java:526)
   at javax.swing.JFrame.createRootPane (JFrame.java:221)
   at javax.swing.JFrame.getRootPane (JFrame.java:205)
   at javax.swing.JFrame.frameInit (JFrame.java:152)
   at javax.swing.JFrame.<init> (JFrame.java:114)
   at test2.main (test2.java:8)

so during its analysis i found that the program crash when it internally try
to call any UImamager.java function. I also found inside UIManager.java it 
stuct inside static{} block when a call to functoin setLookAndFeel(LookAndFeel newLookAndFeel)
is made. Inside setLookAndFeel stuck at:

	 newLookAndFeel.initialize();

I found this function is defined in BasicLookAndFeel.java file. Inside
this intialize() function it stuck at:

	 toolkit.addAWTEventListener(popupHelper, AWTEvent.MOUSE_EVENT_MASK);


Here i found there are two Toolkit.java file:
1)/software/kaffe-1.1.7/libraries/javalib/awt-implementations/kaffe/java/awt/Toolkit.java
2)/software/kaffe-1.1.7/libraries/javalib/external/classpath/java/awt/Toolkit.java

I found that this function defined in (2)Toolkit.java but it try to include
(1)Toolkit.java and hence not able to find the function addAWTEventListener(popupHelper, AWTEvent.MOUSE_EVENT_MASK)

SUGGEST some methods or clue so that i can get out of this problem.


Thanks
Praveen Kumar








More information about the kaffe mailing list