启动 Eclipse 导致无法创建 Java 虚拟机
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15404964/
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
Starting Eclipse results in Failed to create Java Virtual Machine
提问by AmitG
When starting eclipse.exe it gives and error message
启动 eclipse.exe 时,它给出错误消息
Failed to create Java Virtual Machine
未能创建 Java 虚拟机
When I click eclipsec.exe then eclipse starts. What is the difference between eclipse.exe
and eclipsec.exe
?
当我单击 eclipsec.exe 时,eclipse 启动。eclipse.exe
和 和有eclipsec.exe
什么区别?
Why eclipse.exe is not working now which was working yesterday?
为什么 eclipse.exe 现在不起作用而昨天起作用了?
What will be impact if I use eclipsec.exe to start eclipse?
使用eclipsec.exe启动eclipse会有什么影响?
采纳答案by ajduke
When I click eclipsec.exe then eclipse starts. What is the difference between eclipse.exe and eclipsec.exe?
当我单击 eclipsec.exe 时,eclipse 启动。eclipse.exe 和 eclipsec.exe 有什么区别?
from eclipse wiki
来自日食维基
You can start Eclipse by running eclipse.exe on Windows or eclipse on other platforms. This small launcher essentially finds and loads the JVM. On Windows, the eclipsec.exe console executable can be used for improved command line behavior.
您可以通过在 Windows 上运行 eclipse.exe 或在其他平台上运行 eclipse 来启动 Eclipse。这个小型启动器本质上是查找并加载 JVM。在 Windows 上,eclipsec.exe 控制台可执行文件可用于改进命令行行为。
meaning the eclipse.exe
find the JVM for you and starts Eclipse IDE , Where as the eclipsec.exe
is console exe where you can tweak how eclipse starts
这意味着eclipse.exe
为您找到 JVM 并启动 Eclipse IDE,在eclipsec.exe
控制台 exe 中您可以调整 Eclipse 的启动方式
What will be impact if I use eclipsec.exe to start eclipse. It give command prompt also.
使用eclipsec.exe启动eclipse会有什么影响。它也给出命令提示符。
No impact as such, eclipsec.exe is for windows only
没有影响,eclipsec.exe 仅适用于 Windows
回答by UdayKiran Pulipati
Open eclipse.ini file and Change the vmargs sizes to
打开 eclipse.ini 文件并将 vmargs 大小更改为
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
It works on my system.
它适用于我的系统。
回答by iffu
1.Open folder with Eclipse.exe and find eclipse.ini file
1.用Eclipse.exe打开文件夹,找到eclipse.ini文件
2.Replace -vmargs by your current real path of javaw.exe:
2.将 -vmargs 替换为您当前的 javaw.exe 真实路径:
-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”
-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”
3.save .ini file and open eclipse. It will work.. happy coding.
3.保存.ini文件并打开eclipse。它会工作......快乐编码。
回答by Jeet
In your eclipse.inifile
在你的eclipse.ini文件中
Add -vm C:\Program Files\Java\jre7\bin\javaw
below the line -Dosgi.requiredJavaVersion=1.6
-vm C:\Program Files\Java\jre7\bin\javaw
在行下方添加-Dosgi.requiredJavaVersion=1.6
And then remove 256m
which is below the line --launcher.XXMaxPermSize
.
It will work.
然后删除256m
线下方的--launcher.XXMaxPermSize
。它会起作用。
回答by Peris
Adding following line in .ini solved the same reported issue in my machine. -vm {path}\javaw.exe
在 .ini 中添加以下行解决了我机器中报告的相同问题。-vm {路径}\javaw.exe
Example: "-vm C:\Program Files\Java\jre7\bin\javaw.exe"
示例:“-vm C:\Program Files\Java\jre7\bin\javaw.exe”
回答by NoNaMe
Write like below in .ini file and than it will work properly:
在 .ini 文件中像下面这样写,然后它会正常工作:
-vm C:\Java\jdk1.6.0_25\bin\javax.exe
-vm C:\Java\jdk1.6.0_25\bin\javax.exe
Added above line in eclipse.ini
file(on the top) and worked for me. C:\Java\jdk1.6.0_25\bin
This path can be changed as per your system.
Hope this will help someone.
在eclipse.ini
文件中添加了上面的行(在顶部)并对我来说有效。C:\Java\jdk1.6.0_25\bin
可以根据您的系统更改此路径。希望这会帮助某人。