这两天eclipse不知咋了,编辑界面卡的不行,尤其打开jsp或者xml文件,而且频繁发生内存溢出问题,简直没法工作 ,google了很多文章,说是要加大eclipse内存区域,但无论如何设置,依旧报如下错误
:
!ENTRY org.eclipse.ui 4 0 2010-12-31 17:19:21.578
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.OutOfMemoryError: PermGen space
eclipse.ini文件内容:
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-showsplash
org.eclipse.platform
-Xms512m
-Xmx1024m
-XX:PermSize=256M
-XX:MaxPermSize=256M
最后想到前几天装了PMD CheckStyle插件,卸载后,问题依旧 。
后来从原始的eclipse包里,拷贝出eclipse.ini文件,打开(记住要用editplus之类的工具打开,千万不能用windows的记事本,很奇怪)加上后面两行,终于回归正常!
最终的eclipse.ini文件内容:
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:PermSize=128M
-XX:MaxPermSize=128M