08
May
08

Running Eclipse on MacBooks with Java 6

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 on a Mac 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.

About these ads

30 Responses to “Running Eclipse on MacBooks with Java 6”


  1. May 9, 2008 at 1:38 pm

    This info was extremely helpful to me. Thank you!

  2. 2 Aaron
    May 10, 2008 at 11:26 am

    Thank you for helping me get Eclipse running!

  3. May 10, 2008 at 5:22 pm

    Glad this helped – I figured it would be an problem more and more people would discover, with very few solutions available.

  4. 4 Ak
    May 15, 2008 at 5:10 pm

    Thank you very much =)

  5. 5 mulman
    June 24, 2008 at 5:46 pm

    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.

  6. 6 CELSO
    July 21, 2008 at 2:54 pm

    Hi, I’d like to know what is the database design plugin to eclipse? Can you help me?

  7. July 28, 2008 at 9:19 pm

    Glad to help folks.

    Celso, I am not familiar with the plugin you’re looking for. Wish I could help.

  8. 8 Kristoffer
    August 24, 2008 at 5:49 am

    Cheers for helping me out on this one :)

  9. November 28, 2008 at 1:30 pm

    First off Apple never supported SWT direct, it’s an Eclipse specific technology maintained by the Eclipse Foundation. Second, then entire JDK is 64-bit, not just the “bindings”. Lastly, SWT uses Carbon, not Cocoa. So I don’t know if I’d declare Apple evil when it’s IBM that decided to go their own way with SWT and made the promise of “write once, run anywhere” a bit more dodgy. Granted, SWT gave Sun a swift kick in the nuts to improve Swing, and I find that it is now a hell of a lot better. But SWT is still always going to play second fiddle on Mac OS X because it is a tier 2 platform for Eclipse. And yes, I hate it every bit as much as you because NetBeans still isn’t there and Idea is still out of my price range.

    Ryan-

  10. 10 sam i am
    January 8, 2009 at 11:24 am

    Give me a break. Don’t blame Apple for Eclipse lameness. Apple is far from prefect, but I don’t blame them for this at all.

    SWT is not a part of Sun’s Java. Why should Apple be responsible for supporting it? Should they support every third party library? The people responsible for Eclipse created SWT and orignally just provided Linux and Windows versions – breaking Java’s write once run everywhere promise – nice. The community then decided they’d take up this slack and ported it to the Mac. It guess it was nice of them, but they should be responsible for maintaining it.

    Eclipse is OK (especially for free) but there are better java development tools available for the Mac that work with the current releases of Java. Xcode, Netbeans and Intellij’s IDEA all come to mind.

  11. January 8, 2009 at 9:51 pm

    Sam – I blame Apple for abandoning 32-bit Java – are they not responsible for maintaining that? With large numbers of their own customers still on 32-bit platforms, and plenty of apps with 32-bit dependencies, Apple knew some people were going to end up stuck. Anyone on a 1st gen MacBook Pro now has to buy a new Mac if they want to develop Java 6 – those laptops aren’t even 3 years old and they are a dead end for Java development now.

    SWT would work fine if Apple had bothered to retain compatibility for 32 bit platforms. Yes, SWT is weird and I don’t really care for it. IDEA is just too resource intensive on large projects. Eclipse scratches my itch. Some folks like TextMate. That’s fine. Based on the traffic this post gets, I think lots of people ran into this issue, and find developing in Eclipse on their Mac enjoyable.

  12. 12 mulan
    February 19, 2009 at 3:33 pm

    Thank you very much! Finally got eclipse working on my new Mac!

  13. 13 Barry
    April 7, 2009 at 1:05 pm

    This is very helpful. Just to make a note for people who know nothing about Mac (like myself),
    Eclipse.app is not seen from the Finder UI. I have to go through command line to enter that folder.

    Mac basically put an UI on top of a free OS kernel and add a bunch of “glossy” useless apps.
    Piece of junk!

  14. 14 Chris
    April 15, 2009 at 2:44 am

    Thanks. This was very helpfull. Took me a while get the java 6 upgrade to work with maven, and when it finally did, eclipse crashed. This worked just great. Thanks

  15. June 8, 2009 at 3:39 am

    thanks, that did the trick. and yes, it’s annoying that java is not “better” supported and integrated by Apple…

  16. 16 Hal
    September 9, 2009 at 6:24 pm

    Note – the Galileo release of Eclipse has an implementation of SWT using Cocoa. That means it “just works” with the Mac OS X Java 1.6 now. No modifications needed.

  17. 17 britcruise
    February 25, 2010 at 4:09 pm

    *bowing*

  18. 18 Paul
    April 2, 2010 at 3:26 pm

    This is another big THANK YOU to posting your findings!!

  19. 19 Carlton McDonald
    June 7, 2011 at 11:06 am

    Thanks for this,

    I made the change – seemed straightforward enough but the Eclipse icon at the finder still has a line through it and consequently will not run. The message is still:

    You can’t open the application “Eclipse” because it’s not supported on this type of Mac.

    What do I do next?

    Thanks for the glimmer of hope.

    Carlton

    • June 9, 2011 at 10:11 pm

      I wish I had more suggestions. It’s been a long while since I looked at this, and I really don’t know what to suggest. I haven’t even used Eclipse in a few years.


Comments are currently closed.

Follow

Get every new post delivered to your Inbox.

Join 32 other followers

%d bloggers like this: