How to run Eclipse Indigo on JDK 1.7 OSX
Asked Answered
R

3

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. 
Remorseful answered 6/10, 2011 at 2:53 Comment(3)
Specify the vm to use in eclipse.ini? (Just a guess, never used eclipse on osx before)Ocasio
OSX uses Info.plist - but it fails.Remorseful
Make sure you are using 64bit Eclipse. Had no luck running 32bit one on 1.7 jvm with any options.Roguish
E
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.

Eskimoaleut answered 17/6, 2012 at 19:25 Comment(8)
I experienced the same issue and your proposal was the appropriate solution. Thanks !Brainchild
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" windowsTrotman
@MaryHamlin Doesn't this just mean that compilation etc is under Java 7 but eclipse )Indigo) still runs under Java 6?Prosper
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.Eskimoaleut
eclipse kepler has NO eclipse -> Preferences -> Java -> Installed JREsLuminance
@sundowner, I haven't used Eclipse in a while, but the issue that I was having was with the Indigo version (pre 3.7.1). As I said in my previous comment, I think that Java 7 support is now baked into newer releases of Eclipse, like the Kepler version that you are referring to.Eskimoaleut
I found my problem: I had installed eclipse for C/C++, which does not include the Java Developer Tools. I added that, and now everything works, and the JRE1.7 is chosen as the default.Luminance
This should have a prerequisite that you have already been able to launch Eclipse! In my case, I'm sure I'm not the only one, I'm not able to launch Eclipse to begin withGertrudgertruda
S
1

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

Worked for me.

This is an old solution and has no relevance anymore.

Sidesaddle answered 18/10, 2011 at 8:55 Comment(0)
T
1

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

It's work for me.

Tutt answered 29/5, 2012 at 6:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.