问题
I decided to update my eclipse to 4.4 (luna release). When I try to launch it however, I get an error stating that eclipse requires 1.7 or later of java jvm.
Just wanted to see if this is true and if it is possible to get it running with 1.6 (specifically 1.6.0_65)
回答1:
If there is an explicit message stating that 1.7 or later is required when you run it with 1.6, I expect this to be a strong (ie blocking) minimum requirement. Eclipse Luna (4.4) is the first release requiring 1.7:
http://wiki.eclipse.org/Eclipse/Installation
And still, if you still doubt it you can verify for which version it was compiled. For every Eclipse classes run the following command:
javap -verbose EclipseClass.class
Look for Major Version. If value is 51 this means it was compiled for java 1.7, so you are out of luck for 1.6. The magic numbers for major versions are :
J2SE 8 = 52 (0x34 hex),
J2SE 7 = 51 (0x33 hex),
J2SE 6.0 = 50 (0x32 hex),
J2SE 5.0 = 49 (0x31 hex),
JDK 1.4 = 48 (0x30 hex),
JDK 1.3 = 47 (0x2F hex),
JDK 1.2 = 46 (0x2E hex),
JDK 1.1 = 45 (0x2D hex).
and are described here:
http://en.wikipedia.org/wiki/Java_class_file#Magic_Number
Thing is, each eclipse bundle have different minimum requirements, so this may not be a good option for a platform as big as Eclipse. Anyway, I mention it because its good to know.
回答2:
I also had this problem during the IDE Luna installation. In my case, to solve this problem, I had that change the system variables in win 7. In my computer was the variable that was did referenced the jdk 6... after that I changed it, I could open it again.
This link helped me:
回答3:
It is requesting to install latest JDK. This is the link http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
回答4:
I have installed jdk1.7.0_67 and its running successfully.
来源:https://stackoverflow.com/questions/24500488/does-eclipse-4-4-luna-require-java-1-7