I'm compiling an open source project with "mvn install" but ended up with java.lang.OutOfMemoryError: Java heap space
. I tried to execute java -Xmx256m
but the output was java synopsis which indicated it's an invalid command.
I'm using jdk1.5.0_08
, any ideas why this is happening?
Thanks,
Set the environment variable:
MAVEN_OPTS="-Xmx512m"