I am running a makefile and after a while I get the following error:
java.lang.OutOfMemoryError
I am wondering whether there is a command that allows me to increase
the Java Heap Space. I dont want to change the makefile itself, so I need
some kind of “global” command that allows me to reset the Java Heap Space.
Many thanks,
Patrick
EDIT: Thanks for your answers. But I am looking for a more global command, that
allows me to specify to set the Heap space once and for all like:
SET JAVA_HEAP_SPACE = 5GB
Thanks
You can set java heap space from command line:
java -Xmx1600m programNow your heap space is 1600 MB.(Assuming your hardware can already afford 1600MB.)For Windows platforms, you can set it from Java Runtime Environment
Settings as well. Follow Control Panel => Programs => Java. Navigate to Java tab. View Java Runtime Environment Settings. Add
-Xmx1600mto Runtime Parameters. Save and go on.For Linux platforms, you can launch Control Panel and edit runtime parameters. It can be run from something like
/usr/j2se/jre/bin/ControlPanel. Find your own directory. Read here please: http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment-guide/jcp.html