简体   繁体   English

在Eclipse中始终获取java.lang.OutOfMemoryError:PermGen空间错误

[英]Consistently getting java.lang.OutOfMemoryError: PermGen space Error in Eclipse

i am Consistently getting java.lang.OutOfMemoryError: PermGen space Error in Eclipse while opening any file in eclipse(exclipse gets closed and logs shows this error) and also when i manuaalu exit the exclipse it shows same error saying unable to save the state of workspace(stating permgen error) Here are the logs in log file under metadata foldet of workspace 我一直在获取java.lang.OutOfMemoryError:PermGen space Eclipse中的错误 ,同时在eclipse中打开任何文件(exclipse被关闭并且日志显示此错误),并且当我manuaalu退出该内容时,它也显示相同的错误,表明无法保存状态工作区(显示permgen错误)这是工作区的元数据文件夹下的日志文件中的日志

!ENTRY org.eclipse.ui 4 0 2011-12-14 10:42:09.464
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.osgi 4 0 2011-12-14 10:42:11.336
!MESSAGE Application error
!STACK 1
java.lang.OutOfMemoryError: PermGen space

!ENTRY org.eclipse.osgi 4 0 2011-12-14 10:42:12.303
!MESSAGE Shutdown error
!STACK 1
java.lang.OutOfMemoryError: PermGen space

Even after I have changed the eclipse.ini parameters to below values.Getting same error 即使我将eclipse.ini参数更改为以下值之后,也遇到相同的错误

-Xms4096m 
-Xmx4096m 
--launcher.XXMaxPermSize 
4096m 

i am using eclipse helios 3.6 version and having RAM of 8 GB. 我正在使用eclipse helios 3.6版本并具有8 GB的RAM。 I am not getting how to get rid of this. 我没有摆脱它的方法。

您可以通过在eclipse.ini文件中添加以下行来增加烫发空间

-XX:PermSize=XXXm -XX:MaxPermSize=XXXm

I keep seeing this issue during the development of Eclipse plugin. 在Eclipse插件的开发过程中,我一直看到这个问题。 The only way that I could get rid of it is to switch to a new workspace. 我可以摆脱的唯一方法是切换到新的工作区。 My project source code is somewhere else, so every time I just need to import my project into the new workspace. 我的项目源代码在其他地方,所以每次我只需要将项目导入到新的工作区中。

I believe there are something bad stored in the workspace, I just don't know what are they. 我相信工作区中存储着一些坏东西,我只是不知道它们是什么。

If you wrote code before this issue appears, just try to move your .log file or delete it. 如果您在此问题出现之前编写了代码,则只需尝试移动.log文件或将其删除。 It is a issue because of the size from the log file. 由于日志文件的大小,这是一个问题。

delete .metadata folder and restart eclipse and re-import all projects into your workspace. 删除.metadata文件夹,然后重新启动eclipse并将所有项目重新导入到您的工作区中。 This worked for me. 这对我有用。

如果发生此问题,只需关闭新的发行版并重新安装即可。(我也遇到了一些内存问题,我增加了内存,但这对我没有帮助。)但是重新安装解决了所有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM