Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT compiler is running out of memory. How do I configure it within IntelliJ?

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?)

like image 866
Tim Cooper Avatar asked Jan 31 '12 12:01

Tim Cooper


2 Answers

You can configure the heap in the GWT facet settings:

gwt facet heap

like image 104
CrazyCoder Avatar answered Sep 20 '22 11:09

CrazyCoder


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.

like image 35
Daniel Kurka Avatar answered Sep 23 '22 11:09

Daniel Kurka