Eclipse + GWT -gt; Out of memory in development mode(Eclipse + GWT -开发模式内存不足)
问题描述
如果我在 Eclipse 中以开发模式运行我的 GWT 应用程序并在浏览器中单击一段时间,我总是在 Eclipse 中收到内存不足"错误.我的电脑有 16 GB 内存,从来没有超过 8 GB.
If I run my GWT application in eclipse in development mode and click around in the browser for some time, I always get an "out of memory" error in eclipse. My computer has 16 GB Ram, and there is never used more than 8GB.
我尝试了几个配置参数.我的运行配置中的 VM 参数包含以下参数:-Xms8192m -Xmx8192m"
I tried several config parameters. The VM-arguments in my Run configuration contain these parameters: "-Xms8192m -Xmx8192m"
即使在 eclipse.ini 中我也测试了几个配置参数,现在看起来像这样:
Even in the eclipse.ini I tested several config parameters and now it looks like this:
--launcher.XXMaxPermSize
8192M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
8192m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms8192m
-Xmx8192m
但我仍然收到错误消息.有什么办法可以预防吗?
But I still get the error. Is there any way to prevent this?
推荐答案
如果浏览器应用程序抛出 OutOfMemoryError,那么您不需要更改 Eclipse 设置(eclipse.ini),这仅适用于 Eclipse 本身(更多内存,通常更快的工作台).
If the browser application is throwing the OutOfMemoryError, then you don't need to change the Eclipse settings (eclipse.ini), that's only for Eclipse itself (more memory, usually faster workbench).
要增加应用程序的内存(任何从 Eclipse 启动的 Java 应用程序),请转到运行菜单中的 Run/Debug 配置... 并设置 VM 参数在应用程序运行配置的 Arguments 选项卡上:
To increase an app's memory (any Java app launched from Eclipse), go to the Run/Debug configurations... in the Run menu and set the VM arguments on the Arguments tab of the app's run config:
-Xms128M -Xmx1024M -XX:MaxPermSize=256M
这篇关于Eclipse + GWT ->开发模式内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Eclipse + GWT ->开发模式内存不足
基础教程推荐
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
