Eclipse问题“Failed to create the Java Virtual Machine”解决办法

不知道是不是因为系统和特定JDK版本的原因,以前在WIN7上面都没有出现过这个问题,今天电脑安装了一个XP系统,运行Eclipse居然

出现这个问题,如下图所示:

该开始以为是Eclipse找不到虚拟机,需要制定jvm.dll文件,但是不是这个问题,需要更改eclipse.ini的堆大小配置,256M不行,需要128M,

这一点没有深入研究,不知道是不是因为XP系统的原因,决定了其是128M。

修改前的eclipse.ini为:

 1 -startup
2 plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
3 --launcher.library
4 plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
5 -product
6 org.eclipse.epp.package.jee.product
7 --launcher.defaultAction
8 openFile
9 --launcher.XXMaxPermSize
10 256M
11 -showsplash
12 org.eclipse.platform
13 --launcher.XXMaxPermSize
14 256m
15 --launcher.defaultAction
16 openFile
17 -vmargs
18 -Dosgi.requiredJavaVersion=1.5
19 -Xms40m
20 -Xmx512m

修改后的eclipse.ini文件为:

 1 -startup
2 plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
3 --launcher.library
4 plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
5 -product
6 org.eclipse.epp.package.jee.product
7 --launcher.defaultAction
8 openFile
9 --launcher.XXMaxPermSize
10 128M
11 -showsplash
12 org.eclipse.platform
13 --launcher.XXMaxPermSize
14 128m
15 --launcher.defaultAction
16 openFile
17 -vmargs
18 -Dosgi.requiredJavaVersion=1.5
19 -Xms40m
20 -Xmx512m

这样子配置之后Eclipse就可以正常的运行了。


posted on 2012-03-04 21:21  小导  阅读(1582)  评论(0编辑  收藏  举报

导航