主要原因是Eclipse默认配置内存较小
配置文件为eclipse/eclipse.ini
下面为eclipse默认配置
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
下面为更改后的配置
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms512m
-Xmx1024m
更改后保存重启eclipse即可解决问题
***注Xms 和 Xmx 根据自己电脑配置酌情选择 否则eclipse会占用较大内存 电脑卡顿。
最后祝您编码愉快

本文介绍如何通过修改Eclipse的配置文件eclipse.ini来增加初始内存(Xms)和最大可用内存(Xmx),以此解决Eclipse运行时内存不足的问题,并提供了一个具体的配置示例。
460

被折叠的 条评论
为什么被折叠?



