You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dana Rice <Da...@exodus.net> on 2001/04/03 23:28:07 UTC

javac on Unix

Has anyone had a problem using javac on Unix. The problem is related to
memory and you get this error:
[javac] The compiler has run out of memory.  Consider using the
"-J-mx<number>" command line option to increase the maximum heap size.
 I have tried compiling the source files in groups but there comes a point
when there is inter class dependency and the build fails. I have tried using
javac as an executable with <execon> so I can pass it the -J-Xmx32m argument
but this doesn't work either. Anyone seen this?

RE: javac on Unix

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Dana,

Since javac is used as a class from within Ant, it is run within Ant's VM
and therefore you need to increase the size of Ant's VM. You can do that
with the JAVACMD environment variable. Set it to something like
JAVACMD=java -Xmx256m
for example.

Conor


> -----Original Message-----
> From: Dana Rice [mailto:Dana.Rice@exodus.net]
> Sent: Wednesday, 4 April 2001 7:28 AM
> To: AntUG (E-mail)
> Subject: javac on Unix
>
>
> Has anyone had a problem using javac on Unix. The problem is related to
> memory and you get this error:
> [javac] The compiler has run out of memory.  Consider using the
> "-J-mx<number>" command line option to increase the maximum heap size.
>  I have tried compiling the source files in groups but there comes a point
> when there is inter class dependency and the build fails. I have
> tried using
> javac as an executable with <execon> so I can pass it the
> -J-Xmx32m argument
> but this doesn't work either. Anyone seen this?
>