出现GC overhead limit exceeded 的解决方案

来源:互联网 发布:破解软件网站排行榜 编辑:程序博客网 时间:2024/05/03 19:28

在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

转自于:http://blog.csdn.net/rain_butterfly/article/details/38224513
0 0