Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330317 - Exception in thread "main" java.lang.NoClassDefFoundError: apple/laf/CoreUIControl
Summary: Exception in thread "main" java.lang.NoClassDefFoundError: apple/laf/CoreUICo...
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-16 03:42 EST by Harry Erwin CLA
Modified: 2010-11-16 09:37 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harry Erwin CLA 2010-11-16 03:42:10 EST
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
Comment 1 Remy Suen CLA 2010-11-16 05:25:37 EST
How is this problem related to Eclipse exactly?

Does the program run if you launch from the command line?
Comment 2 Harry Erwin CLA 2010-11-16 05:37:59 EST
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.
Comment 3 Remy Suen CLA 2010-11-16 05:40:51 EST
(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
Comment 4 Harry Erwin CLA 2010-11-16 06:21:20 EST
(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...
Comment 5 Harry Erwin CLA 2010-11-16 06:31:00 EST
(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...
Comment 6 Harry Erwin CLA 2010-11-16 06:33:11 EST
When you move from Java 5 to Java 6, you have to fix the Eclipse preferences. Blame it on operator headspace.