Eclipse启动时提示fail to create the Java Virtual Machine问题的解决

最后更新于:2022-04-01 20:16:37

今天偶然打开Eclipse,发现无法打开,出现如下提示: ![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2016-08-23_57bc06b39dc93.jpg) 后来经过上网查询,发现是eclipse.ini文件的问题,打开eclipse安装目录下的eclipse.ini文件: ~~~ -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807 -product com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 256m -showsplash com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx768m -Declipse.buildId=v22.3.0-887826 -XX:MaxPermSize=512m ~~~ 将其中的256m改为128m,512m改为256m即可~改后如下: ~~~ -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807 -product com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 128m -showsplash com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 128m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx768m -Declipse.buildId=v22.3.0-887826 -XX:MaxPermSize=256m ~~~ 经过简单的修改,即可正常启动~ ![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2016-08-23_57bc06b3b858d.jpg)
';