The title of this post is a bit misleading in that you apparently cannot run Eclipse on a MacBook Pro with Java 6 set as the default JDK. Never mind that it took Apple a year and a half after the release of Java 6 for Apple to support Java 6 on OS X in the first place. I thought Apple was “developer friendly”? My experience has usually been slightly better than working on a PC, except that the failings of a PC can usually be dismissed as Microsoft’s incompetence. Apple seems to act more like a highly-opinionated jerk.
After I upgraded to Java 6 (and then had to manually change my JDK symlink even after the upgrade), Eclipse refused to start. The system log showed:
[0x0-0xa90a9].org.eclipse.eclipse[4265]: _NSJVMLoadLibrary: NSAddLibrary failed for /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Libraries/libjvm.dylib
[0x0-0xa90a9].org.eclipse.eclipse[4265]: JavaVM FATAL: Failed to load the jvm library.
To resolve the issue, I edited /Applications/eclipse/Eclipse.app/Contents/Info.plist, and uncommented this line:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java
Problem solved. Apparently Eclipse uses 32-bit SWT-Cocoa bindings, and Apple just decided that they weren’t going to support 32-bit SWT any more in Java 6, breaking any app that uses them in the process. So the fix is to just run Eclipse under Java 5 (Java 6 projects still work in this setup). I’m starting to lose track of the consumer-unfriendly attitudes I’ve experienced from Apple. Their version of Java 6 is late, incomplete, and lazy.
I will declare this now - Apple is every bit as evil as Microsoft. If Apple EVER gets the market share that Microsoft once held, Microsoft’s anti-trust violations will seem like trivial misdemeanors compared to what Apple would do with such power. I need to gather my thoughts on this soon and elaborate on this point.
This info was extremely helpful to me. Thank you!
Thank you for helping me get Eclipse running!
Glad this helped - I figured it would be an problem more and more people would discover, with very few solutions available.
Thank you very much =)
Thanks for the info - I experienced the exact same problem.
Additionally, I found an application I was running within Eclipse with Java 6 would throw OutOfMemoryException errors. My colleagues running the same setup under Windows had no such problem.
Found that adding the -server JVM argument fixed the problem.