ext-Myself 和两个同事一直致力于 GWT 项目并在 eclipse 中进行编码。该项目正在不断发展,我们正在聘请几位新的开发人员来提供帮助。我的任务是在他们开始工作之前设置他们的工作站。我们当前的系统都按照基本的 GWT 设置指南(http://code.google.com/webtoolkit/usingeclipse.html)开箱即用。
在我的工作系统上,我没有更改 eclipse 设置的任何默认值内存大小。
新系统将运行简单的入门项目,因此我知道我已经设置了 GWT。当我导入当前的代码库时,我可以毫无问题地在本地运行该网站。当我尝试运行 ant 脚本时,我们必须构建项目并将其推送到我们的开发服务器,新系统会抱怨:
线程“main”java.lang.OutOfMemoryError中的异常:超出了GC开销限制
在新系统上,我已将 eclipse.ini 文件修改为并设置 -Xmx1024M,并在 Window>Preferences>Java>Installed 下添加了 -Xmx1024M JRE 都没有解决问题。 (此处显示:http://dinu.blog.com/2010/06/02/out -of-memory/)
我尝试过 32 位和 64 位版本的 eclipse,我什至尝试将我已知的工作 eclipse 文件夹复制到新系统上,但没有任何运气。有人有什么想法吗?
ext-Myself and two co-workers have been working on a GWT project and coding in eclipse. The project is growing and we are bringing on several new developers to help out. I have been tasked with setting up their workstations before they start work. Our current systems all worked out of the box following the basic GWT set up guide (http://code.google.com/webtoolkit/usingeclipse.html)
On my working system I have not changed any of the defaults that eclipse has set for memory size.
The new system will run the simple starter projects, so I know that I have GWT set up. When I import our current code base I can run the site locally without issue. When I try and run the ant script that we have to build our project and push it out to our dev server the new system complains:
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
On the new system I have modified the eclipse.ini file to and set -Xmx1024M and I have added -Xmx1024M under Window>Preferences>Java>Installed JREs neither of which have solved the problem. (shown here: http://dinu.blog.com/2010/06/02/out-of-memory/)
I have tried 32 and 64 bit versions of eclipse, and I have even tried just copying my known working eclipse folder onto the new system without any luck. Does anyone have any ideas?
发布评论
评论(3)
您可能需要增加运行 ant 的 JVM 的内存(通过 eclipse 的外部工具首选项),如下所述:http://soenkerohde.com/2008/06/change-eclipse-ant-settings-when-you-run-out-of-memory/
Likely you need to increase the memory for the JVM running ant (via eclipse's external tools preferences) as described here: http://soenkerohde.com/2008/06/change-eclipse-ant-settings-when-you-run-out-of-memory/
运行某些 Ant 脚本时我们也遇到类似的问题。您可以在“运行”->“外部工具”->“外部工具配置”对话框中为 Ant 构建设置 VM 参数。单击 JRE 选项卡并根据需要设置常用的 -Xmx 和 -Xms 参数。
We have similar issues when running certain Ant scripts. You can set VM arguments for the Ant Build in the Run->External Tools->External Tools Configurations dialog. Click the JRE tab and set the usual -Xmx and -Xms params as needed.
我有同样的问题。我通过在终端窗口中的命令行使用 ant 进行构建来“解决”或更好地避免它。
这里有人建议在 build.xml 中添加一个 fork=yes 属性文件,并阅读此。
I have the same problem. I "solved" or better avoid it by building with ant from the command line in a terminal window.
Here someone proposed adding a fork=yes attribute to the build.xml file, and reading this.