Eclipse错误:“无法创建Java虚拟机” [英] Eclipse error: 'Failed to create the Java Virtual Machine'

查看:3837
本文介绍了Eclipse错误:“无法创建Java虚拟机”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7上启动Eclipse Helios时收到此错误消息:


无法创建Java虚拟机




我的eclipse.ini看起来如下:

  -startup 
plugins / org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-vm
P:\Programs\jdk1.6\bin
--launcher.library
plugins / org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
- launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion = 1.5
-Xms120m
-Xmn100m
-Xmx1024m

我的JAVA_HOME正确设置,我可以告诉。如何解决这个问题?



目前为止我已经尝试过的东西:




  1. 添加javaw.exe的完整路径
    -vm
    P:\Programs\jdk1.6\bin\\bin/\\javaw.exe

  2. 删除 -vm 选项一起

  3. 删除 - launcher.XXMaxPermSize 修复问题,但会导致Permgen错误

  4. 删除值 512 - launcher.XXMaxPermSize 修复问题,但会导致permgen错误

  5. 减少 -Xmx 512m 也解决了这个问题。

为什么我不能对'-Xmx'和'--launcher.XXMaxPermSize'使用'1024m'?

解决方案

1 。从您的eclipse文件夹中打开 eclipse.ini 文件,请参见下图。



< img src =https://i.stack.imgur.com/zL3HQ.jpgalt =eclipse.ini>



2。 strong>打开 eclipse.ini 记事本或任何其他文本编辑器应用程序,查找行 -Xmx256m (或 -Xmx1024m )。现在,将默认值 256m (或 1024m )更改为 512m 。您还需要提供确切的java安装版本(1.6或1.7或其他)。





像这样:

  -Xmx512m 
-Dosgi.requiredJavaVersion = 1.6

strong>

  -Xmx512m 
-Dosgi.requiredJavaVersion = 1.7
/ pre>

OR

  Xmx512m 
-Dosgi.requiredJavaVersion = 1.8

然后它对我来说很好。 >

I am getting this error message when I start Eclipse Helios on Windows 7:

Failed to create the Java Virtual Machine

My eclipse.ini looks as follows:

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-vm
P:\Programs\jdk1.6\bin
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms120m
-Xmn100m
-Xmx1024m

My JAVA_HOME is correctly set as far as I can tell. How can I fix this?

Things I have tried so far:

  1. Adding the full path to javaw.exe -vm P:\Programs\jdk1.6\bin\\bin\javaw.exe
  2. Removing the -vm option altogether
  3. Removing --launcher.XXMaxPermSize fixes the issue, but it causes permgen errors
  4. Removing the value 512 of --launcher.XXMaxPermSize fixes the issue, but it causes permgen errors
  5. Reducing -Xmx to 512m also fixes the issue.

Why can I not use '1024m' for '-Xmx' and '--launcher.XXMaxPermSize'?

解决方案

1. Open the eclipse.ini file from your eclipse folder,see the picture below.

2. Open eclipse.ini in Notepad or any other text-editor application, Find the line -Xmx256m (or -Xmx1024m). Now change the default value 256m (or 1024m) to 512m. You also need to give the exact java installed version (1.6 or 1.7 or other).

Like This:

-Xmx512m
-Dosgi.requiredJavaVersion=1.6

OR

-Xmx512m
-Dosgi.requiredJavaVersion=1.7

OR

-Xmx512m
-Dosgi.requiredJavaVersion=1.8

Then it works well for me.

这篇关于Eclipse错误:“无法创建Java虚拟机”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆