在我的情况下,将Java从1.6更新到1.7后出现此问题。
要了解错误,请在eclipse.exe文件夹中运行java.exe。使用eclipse.ini中的参数,因为它将显示哪个参数导致失败。
例如:
F:\Mobile Class\adt-bundle-windows-x86\adt-bundle-windows-x86\eclipse>java -star
tup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.lib
rary plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-product com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 7
68m -showsplash org.eclipse.platform --launcher.XXMaxPermSize 768m --launcher.d
efaultAction openFile -vm C:\Program Files\Java\jre7\bin\client\jvm.dll -vmargs
-Dosgi.requiredJavaVersion=1.6 -Declipse.buildId=v21.1.0-569685 -Xms40m -Xmx768m
Unrecognized option: -startup
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.所以我将'startup'with更改为'jar',如下所示,并修复了问题:
F:\Mobile Class\adt-bundle-windows-x86\adt-bundle-windows-x86\eclipse>java -jar
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813 -pr
oduct com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 768m
-showsplash org.eclipse.platform --launcher.XXMaxPermSize 768m --launcher.defaul
tAction openFile -vm C:\Program Files\Java\jre7\bin\client\jvm.dll -vmargs -Dosg
i.requiredJavaVersion=1.6 -Declipse.buildId=v21.1.0-569685 -Xms40m -Xmx768m