[Swingwt-developers] Error when running compiled program.
Status: Beta
Brought to you by:
bobintetley
From: Edson C. E. R. <eds...@mg...> - 2005-01-25 18:39:43
|
Hi! I've created a little program: import java.awt.*; import java.awt.event.*; public class Teste extends Frame { public Teste() { addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent evt) { System.exit(0); } }); setLayout(new BorderLayout()); add(new Label("Isto e um teste!")); pack(); show(); } public static void main(String [] args) { new Teste(); } } I compiled with GCJ 3.3 (fine), and when I run: Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:=20 gnu.awt.gtk.GtkToolkit not found in [file:./, core:/] at java.awt.Toolkit.getDefaultToolkit() (/usr/lib/libgcj.so.4.0.0) at java.awt.Window.getToolkit() (/usr/lib/libgcj.so.4.0.0) at java.awt.Container.addImpl(java.awt.Component, java.lang.Object,=20 int) (/usr/lib/libgcj.so.4.0.0) at java.awt.Container.add(java.awt.Component) (/usr/lib/libgcj.so.4.0.= 0) at Teste.Teste() (Unknown Source) at Teste.main(java.lang.String[]) (Unknown Source) If I change java.awt.* to swingwt.awt.* and java.awt.event.* to=20 swingwt.awt.event.*, everything works fine. What I'm doing wrong? Is there any option when compiling where I say to=20 not use gnu.awt.*? Thanks, --=20 Edson Carlos Ericksson Richter MGR Inform=E1tica Ltda. Fones: 3347-0446 / 9259-2993 |