Eclipse 无法启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3591374/
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
Eclipse won't start
提问by Erik Sapir
when trying to start eclipse, i receive the message in the image.
尝试启动 eclipse 时,我收到图像中的消息。
when trying to start other instance of eclipse, i receive a message saying: "failed to create the java virtual machine".
尝试启动 eclipse 的其他实例时,我收到一条消息:“无法创建 Java 虚拟机”。
How can i solve it?
我该如何解决?
回答by YoK
try starting eclipse with -clean option
尝试使用 -clean 选项启动 eclipse
./eclipse -clean
If it still doesn't start check ".log" file for error. This file should be located in "workspace/.metadata" folder. Publish error from log to your question.
如果它仍然没有开始检查“.log”文件是否有错误。此文件应位于“workspace/.metadata”文件夹中。将错误从日志发布到您的问题。
Also check Java version and JAVA_HOME and PATH on your system are set accordingly. Java version should be at least 1.5
还要检查系统上的 Java 版本和 JAVA_HOME 和 PATH 是否相应设置。Java 版本至少应为 1.5
回答by Vineet Reynolds
The message "failed to create the java virtual machine" usually implies the failure to allocate enough memory for starting the JVM. This is often due to unavailability of sufficient contiguous free memory in RAM, or incorrect min and max heap sizes.
消息“无法创建 java 虚拟机”通常意味着无法为启动 JVM 分配足够的内存。这通常是由于 RAM 中没有足够的连续可用内存,或者不正确的最小和最大堆大小。
From the screenshot, it appears that the problem might not be with the min and max heap sizes, so you might want to take a look at the amount of free memory available when starting Eclipse (although that is no indicator of whether all free memory is contiguous).
从屏幕截图看来,问题可能不在于最小和最大堆大小,因此您可能需要查看启动 Eclipse 时可用的可用内存量(尽管这并不能指示是否所有可用内存都已连续)。
To begin fixing this issue, you could start Eclipse from the command-line and observe the error messages reported if any. Then you could proceed to calibrate the JVM settings that are better suited to your installation (heavy plugins will require more memory), or change to another JVM.
要开始修复此问题,您可以从命令行启动 Eclipse 并观察报告的错误消息(如果有)。然后您可以继续校准更适合您的安装的 JVM 设置(大量插件将需要更多内存),或更改为另一个 JVM。
See also
也可以看看
回答by Jonathan Sternberg
Check your version of Java. Oracle accidentally broke Eclipse when they updated the vendor field from 'Sun Microsystems' to 'Oracle'.
检查您的 Java 版本。Oracle 在将供应商字段从“Sun Microsystems”更新为“Oracle”时意外破坏了 Eclipse。
http://insideria.com/2010/08/oracle-breaks-eclipse-and-flex.html
http://insideria.com/2010/08/oracle-breaks-eclipse-and-flex.html
Oracle was nice enough to change it back and release an update, which fixes Eclipse.
Oracle 很好地将其改回并发布了修复 Eclipse 的更新。
回答by Jonathan Sternberg
I had a similar problem when I installed JDK 64-bit version with an install of Eclipse 32-bit (didn't realize it until much searching and searching). Simple solution, but a shot none-the-less.
当我安装 JDK 64 位版本并安装 Eclipse 32 位时遇到了类似的问题(直到大量搜索和搜索才意识到)。简单的解决方案,但仍然是一个镜头。
回答by Ryan Berger
回答by u290629
To modify file eclipse/eclipse.ini, try a smaller number in attribute -Xmx, and restart.
要修改文件 eclipse/ eclipse.ini,请尝试在属性-Xmx 中使用较小的数字,然后重新启动。