Community
Participate
Working Groups
Build Identifier: 20100917-0705 Began with installation of Mac OS X 10.6.5 and Java 6.3 Exception in thread "main" java.lang.NoClassDefFoundError: apple/laf/CoreUIControl at com.apple.laf.AquaLookAndFeel$1.run(AquaLookAndFeel.java:124) at java.security.AccessController.doPrivileged(Native Method) at com.apple.laf.AquaLookAndFeel.initialize(AquaLookAndFeel.java:121) at javax.swing.UIManager.setLookAndFeel(UIManager.java:519) at javax.swing.UIManager.setLookAndFeel(UIManager.java:564) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1329) at javax.swing.UIManager.initialize(UIManager.java:1422) at javax.swing.UIManager.maybeInitialize(UIManager.java:1410) at javax.swing.UIManager.getUI(UIManager.java:992) at javax.swing.JPanel.updateUI(JPanel.java:109) at javax.swing.JPanel.<init>(JPanel.java:69) at javax.swing.JPanel.<init>(JPanel.java:92) at javax.swing.JPanel.<init>(JPanel.java:100) at javax.swing.JRootPane.createGlassPane(JRootPane.java:528) at javax.swing.JRootPane.<init>(JRootPane.java:348) at javax.swing.JFrame.createRootPane(JFrame.java:255) at javax.swing.JFrame.frameInit(JFrame.java:236) at javax.swing.JFrame.<init>(JFrame.java:203) at org.dherwin.wessex.WessexGUI.<init>(WessexGUI.java:766) at org.dherwin.wessex.WessexController.<init>(WessexController.java:24) at org.dherwin.wessex.WessexController.main(WessexController.java:32) Application code available at http://osiris.sunderland.ac.uk/~cs0her/COM379%20Lectures/wessex/ Reproducible: Always Steps to Reproduce: 1. Create project with application code. (Uses JUnit). 2. Launch application
How is this problem related to Eclipse exactly? Does the program run if you launch from the command line?
The same problem seems to occur with anything involving javax.swing. On the other hand, these programs run fine if launched from a jar file or from the command line.
(In reply to comment #2) > The same problem seems to occur with anything involving javax.swing. On the > other hand, these programs run fine if launched from a jar file or from the > command line. What if you take the exact string from Eclipse and launch that from the command line? http://wiki.eclipse.org/Graphical_Eclipse_FAQs#How_do_I_check_for_the_command_line_invocation_that_Eclipse_used_to_launch_an_application.3F
(In reply to comment #3) > (In reply to comment #2) > > The same problem seems to occur with anything involving javax.swing. On the > > other hand, these programs run fine if launched from a jar file or from the > > command line. > > What if you take the exact string from Eclipse and launch that from the command > line? > http://wiki.eclipse.org/Graphical_Eclipse_FAQs#How_do_I_check_for_the_command_line_invocation_that_Eclipse_used_to_launch_an_application.3F It dies. Here's the launch string /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java -Dfile.encoding=MacRoman -Xbootclasspath:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/charsets.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunpkcs11.jar -classpath /Users/herwin/Documents/workspace/Wessex/bin:/Applications/eclipse/junit4.5/junit-dep-4.5.jar:/Applications/eclipse/junit4.5/junit-4.5.jar:/Applications/eclipse/junit4.5/junit-4.5-src.jar org.dherwin.wessex.WessexController Let me correct the version...
(In reply to comment #4) > Let me correct the version... That worked. The message is that if you're upgrading to Java 6, you need to chase up the VM in the preferences...
When you move from Java 5 to Java 6, you have to fix the Eclipse preferences. Blame it on operator headspace.