Eclipse 霓虹灯“无法创建 JVM”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/42518992/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 05:41:22  来源:igfitidea点击:

Eclipse neon "Could not create the JVM"

eclipse

提问by Sachin Thapa

We are setting up eclipse neon on Java 1.7 and it fails to start showing a popup with message

我们正在 Java 1.7 上设置 eclipse neon,但它无法开始显示带有消息的弹出窗口

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

错误:无法创建 Java 虚拟机。
错误:发生了致命异常。程序将会退出。

Here is configuration in eclipse.ini

这是eclipse.ini中的配置

-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx512m

回答by Himanshu Bhandari

I found this answerhelpful. I was getting this error even after using java 8, So just delete eclipse.inifile, but backup first.

我发现这个答案很有帮助。即使在使用 java 8 后我也收到此错误,因此只需删除eclipse.ini文件,但先备份。

回答by Vijeta Mehra

As of Eclipse Platform 4.6, and the Neon release, a Java 8 (or later) JRE or JDK is required to run Eclipse.

从 Eclipse Platform 4.6 和 Neon 版本开始,运行 Eclipse 需要 Java 8(或更高版本)JRE 或 JDK

回答by Jemuel Abrian

i just deleted the eclipse.ini then it worked like a charm

我刚刚删除了 eclipse.ini 然后它就像一个魅力

回答by B.K

There is chance that the current eclipse you have was not completely downloaded. Try downloading again and try the set up again.

您当前的 eclipse 可能没有完全下载。再次尝试下载并再次尝试设置。

回答by user6629913

I received this error after upgrading from neon.2 to neon.3. Since Eclipse is ever-changing, what worked last year may not work today. My experience has shown the VM args to usually be the culprit in this situation, so my solution was to remove the -vmargssection of my eclipse.ini file and then restart Eclipse.

我从 neon.2 升级到 neon.3 后收到此错误。由于 Eclipse 不断变化,去年有效的方法今天可能无效。我的经验表明,在这种情况下,VM args 通常是罪魁祸首,所以我的解决方案是删除-vmargseclipse.ini 文件的部分,然后重新启动 Eclipse。

In my case it started correctly, so I added the VM args back one at a time until it failed. The source of my startup problems thistime was -XX:+UseParallelGC. After some research I swapped it out for -XX:+UseG1GCand now I'm back in business.

在我的情况下,它正确启动,所以我一次添加一个 VM args,直到它失败。我的启动问题的根源,这个时间-XX:+UseParallelGC。经过一番研究,我将其换掉-XX:+UseG1GC,现在我又重新开始营业了。

回答by farhan Habib

Download and install JRE version 8, as it's required by Eclipse.

下载并安装JRE 版本 8,这是 Eclipse 的要求。

回答by Kalaivani Sivasami

just add your jdk path on the top of your init file as below.

只需在 init 文件的顶部添加您的 jdk 路径,如下所示。

-vm

-vm

C:/Program Files/Java/jdk1.8.0_71/bin/javaw

C:/Program Files/Java/jdk1.8.0_71/bin/javaw