使用 Message:-Java 堆空间启动后 Eclipse Kepler 崩溃

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19178125/
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-08-12 14:47:40  来源:igfitidea点击:

Eclipse Kepler Crash after startup with Message:-Java heap space

javaeclipse

提问by

I am getting below exception

我低于异常

An internal error occurred during: "Building workspace".
Java heap space

and then i am getting

然后我得到

An out of memory has occured. COnsult the "Running Eclipse" section of the read me file on preventing such kind of error in future..........................
DO you want to exit the workbench?

采纳答案by Gurminder Singh

In your eclipse installation folder, find the eclipse.inifile and change

在您的 eclipse 安装文件夹中,找到eclipse.ini文件并更改

-Xms512m
-Xmx1024m

parameters according to your requirement.

参数根据您的要求。

回答by RamonBoza

You can use that faq http://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F

您可以使用该常见问题解答 http://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F

which indicates to modify the eclipse.inifile

表示修改eclipse.ini文件

the important ones

重要的

--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Xms1024m
-Xmx2048m
-XX:+UseParallelGC
-XX:PermSize=512M
-XX:MaxPermSize=2048M

回答by Ganesa Vijayakumar

Just add this in your eclipse VM arguments.

只需将其添加到您的 eclipse VM 参数中即可。

-XX:MaxPermSize=256m -Xmx1024m

and restart the server.

并重新启动服务器。

回答by Vikram Belde

Go to Eclise.ini file(C:\Program Files\eclipse-standard-kepler-SR2-win32-x86_64\eclipse\eclipse.ini) and open it with a Notepad to edit: -Xms256m -Xmx1024m (as per Requirement)

转到 Eclise.ini 文件(C:\Program Files\eclipse-standard-kepler-SR2-win32-x86_64\eclipse\eclipse.ini)并用记事本打开它进行编辑:-Xms256m -Xmx1024m(根据要求)

This will increase the heap size and overcomes the error.

这将增加堆大小并克服错误。

PS:for Windows 7 and above,"Run as Administrator" can only Save the Change.

PS:对于 Windows 7 及以上版本,“以管理员身份运行”只能保存更改。