Eclipse错误:“无法创建Java虚拟机” [英] Eclipse error: 'Failed to create the Java Virtual Machine'
问题描述
我在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正确设置,我可以告诉。如何解决这个问题?
目前为止我已经尝试过的东西:
- 添加javaw.exe的完整路径
-vm
P:\Programs\jdk1.6\bin\\bin/\\javaw.exe - 删除
-vm
选项一起 - 删除
- launcher.XXMaxPermSize
修复问题,但会导致Permgen错误 - 删除值
512
- launcher.XXMaxPermSize
修复问题,但会导致permgen错误 - 减少
-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
/ pre>
-Dosgi.requiredJavaVersion = 1.7
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:
- Adding the full path to javaw.exe
-vm P:\Programs\jdk1.6\bin\\bin\javaw.exe
- Removing the
-vm
option altogether- Removing
--launcher.XXMaxPermSize
fixes the issue, but it causes permgen errors- Removing the value
512
of--launcher.XXMaxPermSize
fixes the issue, but it causes permgen errors- Reducing
-Xmx
to512m
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
inNotepad
or any othertext-editor
application, Find the line-Xmx256m
(or-Xmx1024m
). Now change the default value256m
(or1024m
) to512m
. 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屋!