22

With the recently OSX JDK 7 ea release from Oracle. How to run Eclipse Indigo ?

I get the following error msg:

$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/JDK 1.7.0 Developer Preview.jdk/Contents/Home
$ java -version
openjdk version "1.7.0-ea"
OpenJDK Runtime Environment (build 1.7.0-ea-b211)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)
$ /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse
JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library. 
3
  • Specify the vm to use in eclipse.ini? (Just a guess, never used eclipse on osx before)
    – user684934
    Commented Oct 6, 2011 at 3:01
  • OSX uses Info.plist - but it fails. Commented Oct 6, 2011 at 3:29
  • Make sure you are using 64bit Eclipse. Had no luck running 32bit one on 1.7 jvm with any options.
    – tuxSlayer
    Commented Nov 14, 2013 at 19:40

3 Answers 3

60

I just tried this myself and had some complications so I thought I would share what ended up working for me:

  1. Download and install Mac OSX version of Java SE Development Kit 7
  2. Under Eclipse -> Preferences -> Java -> Installed JREs, click Add, select Mac OS X VM, then click Next.
  3. Enter "/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home" as the JRE home directory, enter something reasonable like "Java SE 7" as the JRE name, and then click Finish. (Note that you won't be able to navigate to the "../Contents/Home" folder. You will have to type it in manually.)
  4. After adding the new JRE to the list of Eclipse installed JREs, check the box next to the new JRE that you just added and then click OK.
  5. Now under Eclipse -> Preferences -> Java -> Compiler, select 1.7 from the "Compiler compliance level" dropdown and click Ok.

Hope this helps someone who has problems figuring this out. The confusing part for me was selecting the JRE home directory in Eclipse, since I wasn't able to navigate to it.

8
  • I experienced the same issue and your proposal was the appropriate solution. Thanks !
    – jbmusso
    Commented Jun 20, 2012 at 11:55
  • Making copy&paste of "/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home" in the "JRE home" field didn't worked for me...I had to create an alias of the home directory and access this alias from /Library/Java/ in the "open" windows
    – Hamal000
    Commented Oct 2, 2012 at 12:01
  • 1
    @MaryHamlin Doesn't this just mean that compilation etc is under Java 7 but eclipse )Indigo) still runs under Java 6?
    – mmmmmm
    Commented Mar 27, 2013 at 13:05
  • I'm not really an Eclipse/Java expert, and I haven't used Eclipse in a while, so I don't know if I could give you a definitive answer on that. But apparently the 3.7.1 service release of Indigo formally added support for Java 7. Here is a link to an article introducing the release: infoq.com/news/2011/09/eclipse-indigo-371. Clicking on the "what's new with Java 7" link lists a number of Java-7 specific features introduced into the IDE, so you might want to install that service release if you haven't done so already and see if it gives you more support for Java 7. Commented Mar 27, 2013 at 16:25
  • eclipse kepler has NO eclipse -> Preferences -> Java -> Installed JREs
    – sundowner
    Commented Aug 7, 2013 at 1:11
1

The Eclipse bug is resolve in the last Eclipse 3.8 Milestone.

It's work for me.

1

Try this: http://twitter.com/#!/cimnine/status/126219234203271168/photo/1

Worked for me.

This is an old solution and has no relevance anymore.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.