Eclipse:Failed to create the Java Virtual Machine

技术 秋水逸冰 5701浏览 0评论

Eclipse error

  我在用Eclipse的最新版Java EE Kepler(v4.3.0),安装完JBoss Developer Studio 7(Kepler)后,再次启动Eclipse,弹出Failed to create the Java Virtual Machine的错误。确认后就会自动退出。

  原因分析:
安装完JBoss Developer Studio 7(Kepler)后,对Eclipse安装目录下的eclipse.ini文件重新写入新的参数导致。

源文件:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130521-0416
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m

修改后:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130521-0416
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms256m
-Xmx1024m
-Djboss.discovery.directory.url=https://devstudio.jboss.com/updates/7.0/devstudio-directory.xml

可以看到,-Xms和-Xmx的参数被改大了,启动时系统不能为其分配足够的内存导致这个错误的出现。

解决方法:
-Xms不变,将-Xmx的参数修改为512m即可。

转载请注明:秋水逸冰 » Eclipse:Failed to create the Java Virtual Machine

发表我的评论
取消评论

请输入正确答案后提交评论 *超出时限。 请再次填写验证码。

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址