gc overhead limit exceeded eclipse错误解决方式

在Eclipse打包的时候报错:gc overhead limit exceeded eclipse

原因是Eclipse默认配置内存太小须要更改安装Eclipse目录下的eclipse.ini文件。

Eclipse.ini默认文件例如以下:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-Xmx512m

改动例如以下:

-Xms512m
-Xmx1024m

第一个是最小的初始化内存,第二个是最大的占有内存

还能够加上 -XX:MaxPermSize=1024m这个意思是在编译文件时一直占有最大内存,更改上述參数重新启动Eclipse,ok

posted @ 2014-10-17 10:32  hrhguanli  阅读(1986)  评论(0编辑  收藏  举报