Click to enter _ more _java thousand ask
What to do if you can't open eclipse in a Mac environment
There is a big possibility that eclipse (what tools Eclipse:java development should use) does not specify the JDK version (how to install JDK: How to install and configure the JDK) path, boot time is not loaded to the JDK caused by the flash back. Don't say much nonsense, just say the solution.
1. Open $ECLIPSE _home/eclipse.app/contents/macos/eclipse.ini file:
Right-click or CTRL + Tap the Eclipse application in the Finder, then click " Show Package Contents " and go to the directory contents/macos/to find it.
2 . Use ls-ltr/library/java/javavirtualmachines/ to list the paths for each JDK version that you have installed, and then specify it in the Eclipse.ini file Like what:
-vm/library/java/javavirtualmachines/jdk1.8.0_25.jdk/contents/home/bin/java
the system defaults to the following:
/system/library/frameworks/javavm.framework/versions/current/commands/java
The Query method pointed to by the query java_home is attached as follows:
/usr/libexec/java_home-v
You can see where all the java_home point to:
Matching java Virtual Machines (4): 1.8.0_40, x86_64: "Java SE 8"/library/java/javavirtualmachines/jdk1.8.0_40.jdk/ contents/home1.7.0_79, x86_64: "Java SE 7"/library/java/javavirtualmachines/jdk1.7.0_79.jdk/contents/home1.6.0_65- b14-468, x86_64: "Java SE 6"/library/java/javavirtualmachines/1.6.0.jdk/contents/home1.6.0_65-b14-468, i386: "Java SE 6 "/library/java/javavirtualmachines/1.6.0.jdk/contents/home/library/java/javavirtualmachines/jdk1.8.0_40.jdk/ Contents/home
Display the file information as follows:
Ls-ltr/usr/libexec/java_home
Results:
Lrwxr-xr-x 1 root Wheel 10:36/usr/libexec/java_home-/system/library/frameworks/javavm.framework/versions /current/commands/java_home
Click to enter Ooppookid's blog
Java technology _java Thousands of questions (0010) _MAC environment can not open eclipse what to do