GCJ and Swing
Ivan Ivanov
rambiusparkisanius@yahoo.com
Tue Aug 24 07:13:00 GMT 2004
--- Michael Koch <konqueror@gmx.de> wrote:
>> Huh ? Either you forgot to to specify -lgcj or you
> should use gcj to
> link your app.
>> Michael
Michael,
I am obviuosly doing something wrong. I cut my long
class to a short sample which I am trying to compile
and run. The class is the following
import javax.swing.JDialog;
import javax.swing.JLabel;
public class LabelDialog {
public static void main(String[] args) {
JDialog dialog = new JDialog(new JFrame());
dialog.setTitle("Dialog with a label");
JLabel label = new JLabel("The label that will be put
in the dialog");
dialog.getContentPane().add(label);
dialog.pack();
dialog.setVisible(true);
}
}
I am trying to compile it with
gcj LabelDialog.java
the following error is outputed
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.text+0x18):
In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
When I try to make an executable file and run it I
receive the following error
Exception in thread "main" java.lang.Error: not
implemented
at javax.swing.UIDefaults.put(java.lang.Object,
java.lang.Object) (/usr/lib/libgcj.so.4.0.0)
at
javax.swing.plaf.basic.BasicDefaults.BasicDefaults()
(/usr/lib/libgcj.so.4.0.0)
at
javax.swing.plaf.metal.MetalLookAndFeel.getDefaults()
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.UIManager.getDefaults()
(/usr/lib/libgcj.so.4.0.0)
at
javax.swing.UIManager.getUI(javax.swing.JComponent)
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.JPanel.updateUI()
(/usr/lib/libgcj.so.4.0.0)
at
javax.swing.JPanel.JPanel(java.awt.LayoutManager,
boolean) (/usr/lib/libgcj.so.4.0.0)
at javax.swing.JPanel.JPanel()
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.JRootPane.createGlassPane()
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.JRootPane.getGlassPane()
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.JRootPane.JRootPane()
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.JFrame.createRootPane()
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.JFrame.getRootPane()
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.JFrame.frameInit()
(/usr/lib/libgcj.so.4.0.0)
at javax.swing.JFrame.JFrame()
(/usr/lib/libgcj.so.4.0.0)
at LabelDialog.main(java.lang.String[]) (Unknown
Source)
Could you help me with this problem?
Thanks is advance
Ivan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Java
mailing list