[kaffe] kaffe and javax
Hi all, running some demos on my kaffe port (kaffe 1.1.6, compiled for mips machine, using Tiny-X), I testet successfully some programs using awt, now, I have a demo using swing, and the program fails as it do not find javax/swing/JComponent.setDropTarget! When I run it with: LD_PRELOAD=/usr/X11R6/lib/libX11.so:/usr/lib/libpng.so:/usr/lib/libz.so:/usr/local/lib/libjpeg.so kaffe -Dkaffe.awt.nativelib=xawt -Xbootclasspath/p:/home/AMDgiammy/kaffe-1.1.6/kaffeawt.jar JButtons I get the following error: java.lang.NoSuchMethodError: javax/swing/JComponent.setDropTarget(Ljava/awt/dnd/DropTarget;)V at javax.swing.JComponent.init (JComponent.java:413) at javax.swing.JRootPane.init (JRootPane.java:499) at javax.swing.JFrame.createRootPane (JFrame.java:214) at javax.swing.JFrame.getRootPane (JFrame.java:199) at javax.swing.JFrame.frameInit (JFrame.java:151) at javax.swing.JFrame.init (JFrame.java:113) at JButtons.init (JButtons.java:15) at JButtons.main (JButtons.java:11) It seems it do not find swing library: is it correct? I have looked into rt.jar (compiled on host PC and the copied on MIPS machine), and I see am entry -rw-rw-r-- 24643 20-Oct-2005 08:37:38 javax/swing/JComponent.class so I think the swing library is present. Do I need to enable some flags when running the demo? How can I tell where to find the library? thanks for the help giammy Here the example code: import java.awt.*; import javax.swing.*; /** Simple example illustrating the use of JButton, especially * the new constructors that permit you to add an image. * 1998-99 Marty Hall, http://www.apl.jhu.edu/~hall/java/ */ public class JButtons extends JFrame { public static void main(String[] args) { new JButtons(); } public JButtons() { super(Using JButton); //WindowUtilities.setNativeLookAndFeel(); //addWindowListener(new ExitListener()); Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); JButton button1 = new JButton(Java); content.add(button1); ImageIcon cup = new ImageIcon(images/cup.gif); JButton button2 = new JButton(cup); content.add(button2); JButton button3 = new JButton(Java, cup); content.add(button3); JButton button4 = new JButton(Java, cup); button4.setHorizontalTextPosition(SwingConstants.LEFT); content.add(button4); pack(); //setSize(500, 200); setVisible(true); } } -- Gianluca Moro http://groups.yahoo.com/group/embeddeditalia/ ISCRIVITI alla Mailing List Italiana su LINUX EMBEDDED [EMAIL PROTECTED] Visit http://ilpinguino.altervista.org/ ___ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] kaffe and javax
Hi, I made some tests ... --- Gianluca Moro [EMAIL PROTECTED] ha scritto: Hi all, running some demos on my kaffe port (kaffe 1.1.6, compiled for mips machine, using Tiny-X), I testet successfully some programs using awt, now, I have a demo using swing, and the program fails as it do not find javax/swing/JComponent.setDropTarget! When I run it with: It seems to me that the requested function are implemented in libraries/javalib/java/awt/ which is part of GNU classpath, while I'm using the implementation from libraries/javalib/awt-implementations/kaffe/java/awt/, So the question is: to have the supoprt for swing, do I need to use GNU classpath: the problem is that, from what I understand, if I remove --without-classpath-gtk-awt from configuration, I will need GTK, which is not present in my system: so to use swing, do I need to install GTK? thanks giammy LD_PRELOAD=/usr/X11R6/lib/libX11.so:/usr/lib/libpng.so:/usr/lib/libz.so:/usr/local/lib/libjpeg.so kaffe -Dkaffe.awt.nativelib=xawt -Xbootclasspath/p:/home/AMDgiammy/kaffe-1.1.6/kaffeawt.jar JButtons I get the following error: java.lang.NoSuchMethodError: javax/swing/JComponent.setDropTarget(Ljava/awt/dnd/DropTarget;)V at javax.swing.JComponent.init (JComponent.java:413) at javax.swing.JRootPane.init (JRootPane.java:499) at javax.swing.JFrame.createRootPane (JFrame.java:214) at javax.swing.JFrame.getRootPane (JFrame.java:199) at javax.swing.JFrame.frameInit (JFrame.java:151) at javax.swing.JFrame.init (JFrame.java:113) at JButtons.init (JButtons.java:15) at JButtons.main (JButtons.java:11) It seems it do not find swing library: is it correct? I have looked into rt.jar (compiled on host PC and the copied on MIPS machine), and I see am entry -rw-rw-r-- 24643 20-Oct-2005 08:37:38 javax/swing/JComponent.class so I think the swing library is present. Do I need to enable some flags when running the demo? How can I tell where to find the library? thanks for the help giammy Here the example code: import java.awt.*; import javax.swing.*; /** Simple example illustrating the use of JButton, especially * the new constructors that permit you to add an image. * 1998-99 Marty Hall, http://www.apl.jhu.edu/~hall/java/ */ public class JButtons extends JFrame { public static void main(String[] args) { new JButtons(); } public JButtons() { super(Using JButton); //WindowUtilities.setNativeLookAndFeel(); //addWindowListener(new ExitListener()); Container content = getContentPane(); content.setBackground(Color.white); content.setLayout(new FlowLayout()); JButton button1 = new JButton(Java); content.add(button1); ImageIcon cup = new ImageIcon(images/cup.gif); JButton button2 = new JButton(cup); content.add(button2); JButton button3 = new JButton(Java, cup); content.add(button3); JButton button4 = new JButton(Java, cup); button4.setHorizontalTextPosition(SwingConstants.LEFT); content.add(button4); pack(); //setSize(500, 200); setVisible(true); } } -- Gianluca Moro http://groups.yahoo.com/group/embeddeditalia/ ISCRIVITI alla Mailing List Italiana su LINUX EMBEDDED [EMAIL PROTECTED] Visit http://ilpinguino.altervista.org/ ___ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe -- Gianluca Moro http://groups.yahoo.com/group/embeddeditalia/ ISCRIVITI alla Mailing List Italiana su LINUX EMBEDDED [EMAIL PROTECTED] Visit http://ilpinguino.altervista.org/ ___ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] kaffe and javax
Hello, It seems to me that the requested function are implemented in libraries/javalib/java/awt/ which is part of GNU classpath, while I'm using the implementation from libraries/javalib/awt-implementations/kaffe/java/awt/, So the question is: to have the supoprt for swing, do I need to use GNU classpath: the problem is that, from what I understand, if I remove --without-classpath-gtk-awt from configuration, I will need GTK, which is not present in my system: so to use swing, do I need to install GTK? You're right, classpath's swing is only supported running on top of Classpath's AWT implementation :-( Hmm, could be interresting to try to push kaffe's X implemntation so that it would be compatible again since its quite lightweight and stable compared to classpaths GTK based AWT which for now still appears a bit clumsy ;-) There have been reports that the proprietary swing-version does work on Kaffe's XAWT (search the mailing lists, there have been some posts about this issue), although not the very last one but previous releases. Another thing I could recommend is using yet another lightweight library, I would recommend LwVCL ( www.lwvcl.com ) which I used to develop a quite complex rich-client applet and which should be much more suited for your use. Using it you could also remove most of kaffe's swing and awt (all the native widgets) classes. lg Clemens ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] kaffe and javax
On Tue, Oct 25, 2005 at 10:54:44AM +, Clemens Eisserer wrote: Hello, It seems to me that the requested function are implemented in libraries/javalib/java/awt/ which is part of GNU classpath, while I'm using the implementation from libraries/javalib/awt-implementations/kaffe/java/awt/, So the question is: to have the supoprt for swing, do I need to use GNU classpath: the problem is that, from what I understand, if I remove --without-classpath-gtk-awt from configuration, I will need GTK, which is not present in my system: so to use swing, do I need to install GTK? You're right, classpath's swing is only supported running on top of Classpath's AWT implementation :-( Yes. It should be possible to a certain degree to replace Kaffe's original AWT's classes by GNU Classpath's and to move some of the native code into peers that could be plugged into GNU Classpath, but noone has done that yet. Volunteers are most welcome. Hmm, could be interresting to try to push kaffe's X implemntation so that it would be compatible again since its quite lightweight and stable compared to classpaths GTK based AWT which for now still appears a bit clumsy ;-) Well, since it uses Xlib, it's probably more lightweight that using a wrapper around Xlib. On the other hand, chosing a lightweight GUI toolkit written in Java up front may be an even better choice, since both AWT and Swing are pretty big and feature rich. There have been reports that the proprietary swing-version does work on Kaffe's XAWT (search the mailing lists, there have been some posts about this issue), although not the very last one but previous releases. Yes. It used to work last time I tested it a few years ago, but I'd recommend using Free Software instead, to avoid falling into the Java Trap :) The only Sun Swing implementation that I managed to run on Kaffe's X11 AWT implementation was the implementation from Swing 1.1.1 FCS, which was before Java2, and that code has long passed into EOL state, and isn't any longer supported by Sun. Whether relying on an unsupported release of some proprietary software from 5+ years ago is a suitable solution for a lot of problems, I'm not sure. I know I'd prefer to use something else, and your suggestion to use LwVCL is a very good one. There are also Thinlets, that may be more suitable for the mobile use, than a full blown AWT or Swing GUI. Another thing I could recommend is using yet another lightweight library, I would recommend LwVCL ( www.lwvcl.com ) which I used to develop a quite complex rich-client applet and which should be much more suited for your use. Using it you could also remove most of kaffe's swing and awt (all the native widgets) classes. Yep. Thanks for mentioning it! cheers, dalibor topic lg Clemens ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] kaffe and javax
Hi there, You're right, classpath's swing is only supported running on top of Classpath's AWT implementation :-( Just wondering... my tests show the latest release of JamVM looks far more stable running my simple Swing apps than the latest Kaffe. Which AWT implementation would be built by the default kaffe configure script? []s, Fernando Lozano ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] kaffe and javax
[EMAIL PROTECTED] wrote: Hi there, You're right, classpath's swing is only supported running on top of Classpath's AWT implementation :-( Just wondering... my tests show the latest release of JamVM looks far more stable running my simple Swing apps than the latest Kaffe. Which AWT implementation would be built by the default kaffe configure script? GNU Classpath's Gtk+ peer implementation is the default. cheers, dalibor topic ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] kaffe and javax
Hi Dalibor, You're right, classpath's swing is only supported running on top of Classpath's AWT implementation :-( Just wondering... my tests show the latest release of JamVM looks far more stable running my simple Swing apps than the latest Kaffe. Which AWT implementation would be built by the default kaffe configure script? GNU Classpath's Gtk+ peer implementation is the default. Only that, right? But if I force the compilation of other AWT implementations, will the classpath one still be the default, unless I use -D to use another one? []s, Fernando Lozano ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] kaffe and javax
On Tue, Oct 25, 2005 at 12:37:55PM -0200, [EMAIL PROTECTED] wrote: Hi Dalibor, You're right, classpath's swing is only supported running on top of Classpath's AWT implementation :-( Just wondering... my tests show the latest release of JamVM looks far more stable running my simple Swing apps than the latest Kaffe. Which AWT implementation would be built by the default kaffe configure script? GNU Classpath's Gtk+ peer implementation is the default. Only that, right? But if I force the compilation of other AWT implementations, will the classpath one still be the default, unless I use -D to use another one? Yes. The GNU Classpath Gtk+ AWT peer implementation is the default, though if you compile other additional set of AWT peers, like GNU Classpath's Qt4 peers, you can use -D to tell kaffe which set of peers you want to use. cheers, dalibor topic []s, Fernando Lozano ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] kaffe and javax
What I think would be great if one of the two peers could be made QT/GTK on reuquest, should mean that they would use X11/cairo for all the lightweight drawing-stuff and QT/GTK would only take action when a native AWT peer is created. Therefore it would be possible to share the same basic code for X11/QT/Whatever peers and even building x11 alone would be possible. The negative side effect would be that a simple win32 recompilation would fail because the x11 stuff isn't abstracted anymore :-( lg Clemens Btw. there is a pure java-xlib implementation ;-) ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe