Re: swing support in kaffe

zhang_xu_bing <[email protected]>
Newsgroups gmane.comp.java.vm.kaffe.general
Message-ID <[email protected]>
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

_______________________________________________
kaffe mailing list
[email protected]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
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.