在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