java.lang.OutOfMemoryError:Eclipse Helios 中的 PermGen 空间
我在 eclipse 中创建了一个 Xtext 插件。每次我通过上下文菜单将其作为“Eclipse 应用程序”启动时,我都会在新的 Eclipse 实例崩溃之前得到一些宽限期。我切换回原始实例,在控制台窗口中我看到
Root exception:
java.lang.OutOfMemoryError: PermGen space
我已经回顾了论坛中的一些解决方案,但很多与 tomcat 有关。有人可以给我一些关于如何解决这个问题的建议吗?我正在使用 Eclipse helios。我的“eclipse.ini”文件如下所示:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m
我运行 eclipse 的机器只有大约 4GB RAM
============================= =============================================
更新:我希望这对您有帮助给任何可能有同样问题的人。 我按照此处的说明进行操作 并尝试设置 我的 eclipse.ini 文件中的 -XX:MaxPermSize=256m
。这不起作用。最终, 我必须卸载java sdk(我使用的是最新的jdk1.6.0_26)并安装 此处的旧版本 (jdk1.6.0_20)。然后我设置 -XX:MaxPermSize=256m
在我的 eclipse.ini 中,现在看起来如下所示:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx1024m
-XX:MaxPermSize=256m
我希望这可以帮助处于相同情况的人。这个问题发生了 当我启动 Xtext 插件时。
I have created an Xtext plugin in eclipse. Every time I launch it as an 'Eclipse Application' via the context menu, I get a few moments grace before the new Eclipse instance crashes. I switch back to the original instance and in the console window I see
Root exception:
java.lang.OutOfMemoryError: PermGen space
I have looked back at some solutions in the forums but a lot relate to tomcat. Can someone give me a few suggestions as to how I could fix this? I am using Eclipse helios. My 'eclipse.ini' file looks like:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m
The machine I am running eclipse on has just about 4GB of RAM
======================================================================
Update: I hope this is helpful to anyone who may have the same problem.
I followed the instructions here and tried setting the-XX:MaxPermSize=256m
in my eclipse.ini file. This did not work. Eventually,
I had to uninstall java sdk (I was using the latest jdk1.6.0_26) and I installed
an older version (jdk1.6.0_20) from here. I then set -XX:MaxPermSize=256m
in my eclipse.ini and it now looks like the following:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx1024m
-XX:MaxPermSize=256m
I hope this helps out someone in the same situation. This problem was happening
when I'd launch my Xtext plugin.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请将以下内容添加到启动配置中的虚拟机参数中(运行 -> 运行配置),
这应该会有所帮助。
Please add following to the vm parameters in the launch configuration (Run -> Run Configurations)
That should help.
我正在使用 Eclipse Helios build - 1415(64 位)。将其添加到上面的运行配置对我来说不起作用。我必须进去并将其添加到 eclipse.ini 文件中。只需将其附加到文件末尾并重新启动 eclipse 即可工作。
I'm using Eclipse Helios build - 1415 (64 Bit). Adding it to the run configurations above didn't work for me. I had to go in and add it to the eclipse.ini file. Just appended it towards the end of the file and restarted eclipse and it works.