当我在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 虚拟机 P: \程序\ jdk1.6 \ bin \ \ bin \ javaw.exe 完全删除-vm选项 删除——发射器。XXMaxPermSize修复了这个问题,但是它会导致permgen错误 删除——launcher的512值。XXMaxPermSize修复了这个问题,但是它会导致permgen错误 减少-Xmx到512m也解决了这个问题。

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


当前回答

在尝试了上述减少内存的解决方案后,Eclipse开始工作,但每次在从工作空间(特别是在org.eclipse.debug.core)加载插件时都挂起。

我在这里找到了解决方案,Eclipse挂在启动屏幕上,并想分享它。希望它也能帮助到其他人。

其他回答

在尝试了上述减少内存的解决方案后,Eclipse开始工作,但每次在从工作空间(特别是在org.eclipse.debug.core)加载插件时都挂起。

我在这里找到了解决方案,Eclipse挂在启动屏幕上,并想分享它。希望它也能帮助到其他人。

当我的Eclipse质子无法启动时,我遇到了这个问题。 Java虚拟机创建失败

添加到eclipse.ini文件中

-vm
C:\Program Files\Java\jdk-10.0.1\bin\javaw.exe

正确的解决方法是在文件夹中添加指向Java文件夹jvm.dll文件的-vm行。

-vm
C:\Program Files\Java\jre1.8.0_202\bin\server\jvm.dll
/*there is no dquote for path, and path points to right java version folder mentioned in ini file*/

If the above fix is not fruitful, then do not attempt anything else. Most of the advice in this thread is misguided. Some of these hacks might work temporarily or on certain machine configurations, but the contents of eclipse.ini are not trivial nor arbitrary. For the authoritative reference, see this [wiki page]:https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM that explains the contents of the file. Also note the See Also links at the bottom of that page for more details about things like heap size, etc. DO NOT delete eclipse.ini, EVER. It is also inadvisable to remove the -vm or Xmx options. If you do, you're asking for trouble.

以下是wiki页面上与您的问题相关的参考资料:

我尝试了以上所有的方法,但都没用。 按照以下步骤进一步检查:

在cmd: java -下查看java版本 添加-vm javapath 如果您已经安装了java的最新/以前版本,进入java文件夹,检查是否有Jre文件夹和JDK。(Ex-JDK 1.7和jre1.7) 进入控制面板,卸载特定的java运行时环境(JRE)。 现在您应该能够运行eclipse了。

我知道这是很旧的现在,但我刚刚有同样的问题,问题是我分配到太多的内存eclipse,它无法获得。因此,打开eclipse.ini并降低分配给-Xmx的内存数量。我将我的内存更改为-Xmx512m和XXMaxPermSize256m