Java 启动 Eclipse 4.4 时出错“JVM 的 1.6.0_65 版不适合此产品。”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24600860/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error launching Eclipse 4.4 "Version 1.6.0_65 of the JVM is not suitable for this product."
提问by andreaspfr
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:
我在 Mac 上启动 Eclipse 4.4 时遇到问题。我收到以下错误:“JVM 的 1.6.0_65 版不适合此产品。” 我安装了最新版本。当我运行 java -version 我得到:
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
Here is my eclipse.ini file where I already tried to explicit set the -vm parameter to my jdk1.8:
这是我的 eclipse.ini 文件,我已经尝试将 -vm 参数显式设置为我的 jdk1.8:
-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java
采纳答案by atamanroman
Please check if you got the x64 edition of eclipse. Someone answered this just a few hours ago.
请检查您是否有 x64 版本的 eclipse。几个小时前有人回答了这个问题。
回答by Mathieu Fortin
Your -vm argument seems ok BUT it's position is wrong. According to this Eclipse Wiki entry:
你的 -vm 参数似乎没问题,但它的位置是错误的。根据这个Eclipse Wiki 条目:
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
-vm 选项必须出现在 -vmargs 选项之前,因为 -vmargs 之后的所有内容都直接传递给 JVM。
So your -vm argument is not taken into account and it fails over to your default java installation, which is probably 1.6.0_65.
所以你的 -vm 参数没有被考虑在内,它会故障转移到你的默认 java 安装,可能是 1.6.0_65。
回答by user3830506
Here's how to fix this error when launching Eclipse:
以下是启动 Eclipse 时修复此错误的方法:
Version 1.6.0_65 of the JVM is not suitable for this product. Version: 1.7 or greater is required.
JVM 1.6.0_65 版本不适合本产品。版本:需要 1.7 或更高版本。
Go and install latest JDK
Make sure you have installed 64 bit Eclipse
去安装最新的JDK
确保您已安装 64 位 Eclipse