How to handle java.lang.OutOfMemoryError
<p>I am running a makefile and after a while I get the following error:</p>

<pre><code> java.lang.OutOfMemoryError
</code></pre>

<p>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.</p>

<p>Many thanks,
Patrick</p>

<p>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:</p>

<p>SET JAVA_HEAP_SPACE = 5GB</p>

<p>Thanks</p>
