[kaffe] swing support in kaffe

zhang_xu_bing zhang_xu_bing at 163.com
Tue Dec 18 01:09:10 PST 2007


hello: 
in the site : 
http://www.kaffe.org/pipermail/kaffe/2006-October/104687.html
/*********************************************************
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
*****************************************************************/
 
 

  now I meet the same question above mentioning...i use the kaffe(1.1.7)under the redhat 9 ..and useage:  kaffe -Xkaffe-xlib-awt ap;
the error is following: 
java.lang.NoSuchMethodError: java/awt/Toolkit.addAWTEventListener(Ljava/awt/event/AWTEventListener;J)V
   at javax.swing.JPanel.updateUI (JPanel.java:128)
   at javax.swing.JPanel.<init> (JPanel.java:108)
   at javax.swing.JPanel.<init> (JPanel.java:85)
   at javax.swing.JRootPane.createGlassPane (JRootPane.java:563)
   at javax.swing.JRootPane.getGlassPane (JRootPane.java:474)
   at javax.swing.JRootPane.<init> (JRootPane.java:526)
   at javax.swing.JFrame.createRootPane (JFrame.java:219)
   at javax.swing.JFrame.getRootPane (JFrame.java:204)
   at javax.swing.JFrame.frameInit (JFrame.java:152)
   at javax.swing.JFrame.<init> (JFrame.java:114)
   at ErsBlocksGame.<init> (ErsBlocksGame.java:90)
   at ErsBlocksGame.main (ErsBlocksGame.java:540)
   at java.lang.reflect.Method.invoke0 (Method.java)
   at java.lang.reflect.Method.invoke (Method.java:255)
   at org.kaffe.jar.ExecJarName.main (ExecJarName.java:64)
   at org.kaffe.jar.ExecJar.main (ExecJar.java:57)

so I want you help me,,,give me some ideas .....could you help me ...thanks a lots 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://kaffe.org/pipermail/kaffe/attachments/20071218/c6c95e64/attachment-0004.htm 


More information about the kaffe mailing list