I am working on XUbuntu 13.04 and developing swing applications. Since I just wanted to try this application, I ran into java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit at startup.
I found a few questions about the vms server / client and noticed that I have a VM on the server, and for Linux 64 there is no longer a client virtual machine. Nevertheless, IMHO, this problem should not depend on which virtual machine I am running on.
Has anyone else noticed this problem and solved it? What am I doing wrong? Everything works fine with 64-bit jdk, but when I try to use 32-bit jdk, starting is not possible.
Thanks in advance!
PS: Java version 1.7.0_25 and same as 1.7.0_09
EDIT
When using headless mode, the following exceptions occur:
java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(EventQueue.java:1272) at java.awt.EventQueue.invokeAndWait(EventQueue.java:1247) at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1349) at Main.main(Main.java:218) Caused by: java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207) at java.awt.Window.<init>(Window.java:535) at java.awt.Frame.<init>(Frame.java:420) at java.awt.Frame.<init>(Frame.java:385) at javax.swing.JFrame.<init>(JFrame.java:180) at ..MyFrame.<init>(MyFrame.java:23)
java linux swing 32bit-64bit xubuntu
Bertram nudelbach
source share