This question already has an answer here:
Eclipse in OS X uses different version of Java than CLI 6 answers
I have a problem launching Eclipse 4.4 on my Mac. I’m getting the following error: “Version 1.6.0_65 of the JVM is not suitable for this product.” I have the latest version installed. When I’m running java -version I’m getting:
java8]:
vim ~/.bash_profile
{
export JAVA_HOME=”/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home”
}
source ~/.bash_profile
java -version
java7]:
{
export JAVA_HOME=”/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home”
}
eclipse for mac:
eclipse.ini set {
……
-vm/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/bin/java
-vm/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java
}