Eclipse启动时出现fail to create the Java Virtual Machine问题怎么办



Eclipse启动时出现fail to create the Java Virtual Machine问题怎么办?今天偶然打开Eclipse,发现无法打开,出现如下提示:

 

后来经过上网查询,发现是eclipse.ini文件的问题,打开eclipse安装目录下的eclipse.ini文件:

 

  1. -startup
  2. plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
  3. –launcher.library
  4. plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
  5. -product
  6. com.android.ide.eclipse.adt.package.product
  7. –launcher.XXMaxPermSize
  8. 256m
  9. -showsplash
  10. com.android.ide.eclipse.adt.package.product
  11. –launcher.XXMaxPermSize
  12. 256m
  13. –launcher.defaultAction
  14. openFile
  15. -vmargs
  16. -Dosgi.requiredJavaVersion=1.6
  17. -Xms40m
  18. -Xmx768m
  19. -Declipse.buildId=v22.3.0-887826
  20. -XX:MaxPermSize=512m


 

将其中的256m改为128m,512m改为256m即可~改后如下:

 

  1. -startup
  2. plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
  3. –launcher.library
  4. plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
  5. -product
  6. com.android.ide.eclipse.adt.package.product
  7. –launcher.XXMaxPermSize
  8. 128m
  9. -showsplash
  10. com.android.ide.eclipse.adt.package.product
  11. –launcher.XXMaxPermSize
  12. 128m
  13. –launcher.defaultAction
  14. openFile
  15. -vmargs
  16. -Dosgi.requiredJavaVersion=1.6
  17. -Xms40m
  18. -Xmx768m
  19. -Declipse.buildId=v22.3.0-887826
  20. -XX:MaxPermSize=256m

经过简单的修改,即可正常启动~