【eclipse】启动时fail to create Java Virtual Machine

来源:互联网 发布:上海 软件著作权 查询 编辑:程序博客网 时间:2024/05/02 00:25

/*

*   Date:2013-9-29

*  Ques: 以前eclipse都能正常使用,今天一来点击就显示 fail to create java virtual  machine  就上网查。说JDK路径配置错误,一查都对;然后看到有修改eclipse.ini 配置文件的方法,说是eclipse 启动需要很大的内存,而启动不了是 内存不足

*:修改eclipse.ini 就可以正常运行了。

*/

找到eclipse安装目录下的eclipse.ini配置文件,打开如下:

[plain] view plaincopyprint?
  1. -startup  
  2. -vm D:\Java\jre6\bin\javaw  
  3. plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar  
  4. --launcher.library  
  5. plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502  
  6. -product  
  7. org.eclipse.epp.package.jee.product  
  8. --launcher.defaultAction  
  9. openFile  
  10. --launcher.XXMaxPermSize  
  11. 256M  
  12. -showsplash  
  13. org.eclipse.platform  
  14. --launcher.XXMaxPermSize  
  15. 256m  
  16. --launcher.defaultAction  
  17. openFile  
  18. -vmargs  
  19. -Dosgi.requiredJavaVersion=1.5  
  20. -Xms40m  
  21. -Xmx512m  
  22. -Dsun.lang.ClassLoader.allowArraySyntax=true  

        只要吧上面的256M改成128M,512M改成256M,改完之后如下:

[plain] view plaincopyprint?
  1. -startup  
  2. -vm D:\Java\jre6\bin\javaw  
  3. plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar  
  4. --launcher.library  
  5. plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502  
  6. -product  
  7. org.eclipse.epp.package.jee.product  
  8. --launcher.defaultAction  
  9. openFile  
  10. --launcher.XXMaxPermSize  
  11. 128M  
  12. -showsplash  
  13. org.eclipse.platform  
  14. --launcher.XXMaxPermSize  
  15. 128m  
  16. --launcher.defaultAction  
  17. openFile  
  18. -vmargs  
  19. -Dosgi.requiredJavaVersion=1.5  
  20. -Xms40m  
  21. -Xmx256m  
  22. -Dsun.lang.ClassLoader.allowArraySyntax=true  
原创粉丝点击