failed to create the java virtual machine 解决方案

来源:互联网 发布:vb.net 农历 子丑寅卯 编辑:程序博客网 时间:2024/05/16 16:05

最近eclipse老是出现点问题需要重启,但是后来重启多了就出现了个问题,无法启动了,报了个failed to create the java virtual machine,如下图:


最后找了写解决方案,其实很简单,如下:

找到eclipse目录下的eclipse.ini,可以看到如下内容:
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-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

将改成如下并保存,再打开eclipse就可以正常运转了:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-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
-Xmx512m

只要将红色部分的参数修改下就OK了!