GWT 编译器内存不足。如何在 IntelliJ 中配置它?

发布于 2025-01-01 00:32:27 字数 407 浏览 1 评论 0原文

我在 IntelliJ 中运行 GWT。 (普通 GWT、IntelliJ v9)。我能够通过我的“GWT 开发模式”配置运行我的应用程序,但是当我尝试通过我的“本地 tomcat”配置运行它时,我收到一堆涉及 Oracle 的难以理解的错误消息以及各种奇怪的东西我不使用,然后是这个错误,该错误被排序到所有其他错误的底部:

错误:内存不足;要增加内存量,请在启动时使用 -Xmx 标志(java -Xmx128M ...)

我猜测此错误是根本原因。

根据我的理解,有一个 GWT 编译步骤在独立于 IntelliJ 和 tomcat 的 JVM 中运行,所以我不确定在哪里设置 -Xmx 参数。

我的问题是:在哪里可以找到这个 -Xmx 参数? (而且:我是否走在正确的道路上,从表面上理解这个错误消息,还是它是更深层次问题的症状?)

I'm running GWT from within IntelliJ. (Plain GWT, IntelliJ v9). I'm able to run my application via my "GWT development mode" configuration, but when I try to run it through my "local tomcat" configuration, I get a bunch of incomprehensible error messages referring to Oracle and all sorts of weird stuff that I don't use, followed by this error which is sorted to the bottom of all the others:

Error: Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)

I'm guessing that this error is the root cause.

According to my understanding, there is a GWT compilation step which runs in a JVM separate to both IntelliJ and tomcat, and so I'm unsure where to set the -Xmx parameter.

My question is: where do I find this -Xmx parameter? (And: am I on the right track, taking this error message at face value, or is it a symptom of deeper problems?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

森林很绿却致人迷途 2025-01-08 00:32:28

正如 CrazyCoder 刚才所说,您可以在 GWT Facet 设置中增加 gwt 编译器的内存量。如果不增加内存量,GWT 编译器在较大的应用程序上运行内存不足的情况很常见。大多数项目使用 512m 应该没问题,但在大型项目中我已经需要更多内存。

因此,这并不是由于您的某些不良设计而导致的内存不足错误。

As CrazyCoder just said you can increase the amount of memory for gwt compiler in the GWT Facet settings. The GWT Compiler running out of memory on bigger apps is very common if you don`t increase the amount of memory. Most projects should be fine with 512m, but on large projects I already needed more memory.

So this is not some out of memory error caused by some bad design on your behalf.

扛刀软妹 2025-01-08 00:32:28

在我的应用程序中,我将其设置为 1024,但在开发模式下刷新 7-9 页面后,它会导致内存不足。之后,我尝试通过性能黑客来优化它,我通过设置:

MySampleModule_FF.gwt.xml

<set-property name="user.agent" value="gecko1_8"/>

为特定浏览器的每个 gwt 模块分隔了 *.gwt.xml ,并且我使用这个用于 Firefox 的 gwt.xml 运行我的开发模式。除此之外,还分离了国际化。

之后我的内存不足问题大大减少了。

In my application, I set it to 1024 but it gives me out of memory after 7-9 page refresh on dev mode. And after that I tried it to optimize by doing performance hack, I separated my *.gwt.xml for every gwt module for specific browsers by setting:

MySampleModule_FF.gwt.xml

<set-property name="user.agent" value="gecko1_8"/>

And I run my dev mode with this gwt.xml for Firefox. In addition to it also separated internationalization as well.

After that my out of memory issues considerably decreased.

逐鹿 2025-01-08 00:32:28

32 位 JDK 有时也会导致内存不足错误。尝试使用 64 位 JDK。

32 bit JDK also sometimes causes Out Of Memory error. Try using 64 bit JDK.

烟花肆意 2025-01-08 00:32:28

对于那些在 Eclipse 下遇到相同错误的人,请尝试恢复缓存文件(如果它们在 WAR 文件夹中被意外删除),这样我就在 Eclipse 项目下解决了同样的问题。

To those who get the same error under Eclipse, try to restore cache files (if they were removed accidentally in WAR folder ), this way I solve the same problem under my Eclipse project.

十二 2025-01-08 00:32:27

您可以在 GWT 构面设置中配置堆:

gwt 构面堆

You can configure the heap in the GWT facet settings:

gwt facet heap

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文