Eclipse does not open jvm obsolete mac

I am on mac and trying to program java with newer versions of eclipse, but they do not work. Old versions of eclipse work, but I recently installed Eclipse Luna, and when I open it, it says: "Version 1.6.0_31 of the JVM is not suitable for this product. Requires version: 1.7 or more." But I have the latest version of java installed. I installed the latest version of the JDK, and if I'm not mistaken, the JVM is a Java virtual machine, but I don’t know how to update it. I am confident in java, but I start with how the JVM works, so please try to explain the answer as accurately as possible. Also explain why it works and why it has not worked before. I searched on this site before publication, and one answer to a similar problem was to print

 export JAVA_HOME=/usr/libexec/java_home -v 1.7

to the terminal, but the terminal gave me an error:

 -bash: export: `/usr/libexec/java_home': not a valid identifier
 -bash: export: `-v': not a valid identifier
 -bash: export: `1.7': not a valid identifier

So please help, I don’t know what to do.

+4
source share
4 answers

First, you need to make sure that you have installed 1.7 or a newer JVM. To do this, follow these steps:

/usr/libexec/java_home --verbose

This command is built into Mac OS X and displays all known available java environments. If you do not see 1.7 VM in the list, then it has not been installed correctly.

Secondly, you need to make sure that the version of Eclipse you downloaded is compatible with the JVM. For example, I have the following JDKs installed:

1.8.0_05, x86_64:   "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home
1.7.0_55, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
1.6.0_65-b14-462, x86_64:   "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home
1.6.0_65-b14-462, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home

This means that I can use the 64-bit ( x86_64) version of eclipse with 1.6, 1.7 and 1.8 VM.

, 32- (i386) eclipse 1.6 VM , , 32- JDK.

Eclipsepedia , 1,7 JDK/JRE Luna Eclipse 4.4 ( ).

, , 64- .

32/64- eclipse, , eclipse. , , : Eclipse.app, configuration, plugins, eclipse. file eclipse, , ; x86_64, 64- , i386, 32- .

64bit:

$ file eclipse
eclipse: Mach-O 64-bit executable x86_64

32bit:

$ file eclipse
eclipse: Mach-O 32-bit executable i386
+3

. . .

export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"

java -version.

+5

java SE

JAVA_HOME = "/Library/-/JavaAppletPlugin.plugin//"

+1

I think the version of Java 1.6 that you have on your system might be the runtime of Apple Java. By launching Java 7, Apple decided not to create its own port, you need to get it from Oracle.

There seems to be something wrong with your Java installation. You can try to remove existing Java installations, and you can install a new copy of Java 7 from Oracle, and then start first java -v. If this works well, you can install JAVA_HOMEand continue.

0
source

All Articles