Wednesday, November 19, 2008

Maven and the Java Heap size...

Have you ever ran into this error while compiling a project using Maven in Eclipse:

"Java heap space error"

Well this can be easily solved by adding a couple of parameters to the JRE being used in Eclipse. Go to the following location:

Window/Preferences/Java/Installed JREs

Edit the JRE that is ticked and in the Default VM arguments add this:

-Xms128M -Xmx256M

You can modify these values according to your needs, and in case you had this problem while compiling through the console try setting this variable:

export MAVEN_OPTS="-xMS128m -xMX256m"
blog comments powered by Disqus