Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.NoClassDefFoundError: Could not initialize class

807591Mar 19 2008 — edited Mar 28 2008
Hi all,

I am running a swing jar application file from the Unix server. I have set the DISPLAY variable to localhost:0.0 also but I still get the following exception -

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:91)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.Toolkit$2.run(Toolkit.java:836)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:828)
at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:120)
at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1591)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:537)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:577)
at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1331)
at javax.swing.UIManager.initialize(UIManager.java:1418)
at javax.swing.UIManager.maybeInitialize(UIManager.java:1406)
at javax.swing.UIManager.getUI(UIManager.java:1003)
at javax.swing.JLabel.updateUI(JLabel.java:256)
at javax.swing.JLabel.<init>(JLabel.java:145)
at javax.swing.JLabel.<init>(JLabel.java:216)
at com.telcotec.sagui.SAFrame.<clinit>(SAFrame.java:70)
at com.telcotec.sagui.SAGui.main(SAGui.java:344)

Could you please let me know where the issue is? I am using jdk1.6 on solaris 10 machine.

Thanks in advance!!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 25 2008
Added on Mar 19 2008
15 comments
59,601 views