/*
* Date:2013-9-29
* Ques: 以前eclipse都能正常使用,今天一来点击就显示 fail to create java virtual machine 就上网查。说JDK路径配置错误,一查都对;然后看到有修改eclipse.ini 配置文件的方法,说是eclipse 启动需要很大的内存,而启动不了是 内存不足
*:修改eclipse.ini 就可以正常运行了。
*/
找到eclipse安装目录下的eclipse.ini配置文件,打开如下:
- -startup
- -vm D:\Java\jre6\bin\javaw
- plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
- --launcher.library
- plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
- -product
- org.eclipse.epp.package.jee.product
- --launcher.defaultAction
- openFile
- --launcher.XXMaxPermSize
- 256M
- -showsplash
- org.eclipse.platform
- --launcher.XXMaxPermSize
- 256m
- --launcher.defaultAction
- openFile
- -vmargs
- -Dosgi.requiredJavaVersion=1.5
- -Xms40m
- -Xmx512m
- -Dsun.lang.ClassLoader.allowArraySyntax=true
只要吧上面的256M改成128M,512M改成256M,改完之后如下:
- -startup
- -vm D:\Java\jre6\bin\javaw
- plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
- --launcher.library
- plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
- -product
- org.eclipse.epp.package.jee.product
- --launcher.defaultAction
- openFile
- --launcher.XXMaxPermSize
- 128M
- -showsplash
- org.eclipse.platform
- --launcher.XXMaxPermSize
- 128m
- --launcher.defaultAction
- openFile
- -vmargs
- -Dosgi.requiredJavaVersion=1.5
- -Xms40m
- -Xmx256m
- -Dsun.lang.ClassLoader.allowArraySyntax=true