ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: java compilation out of memory problem
Date Fri, 06 Jul 2001 13:14:26 GMT
--- Myron Uecker <> wrote:
> >I run javac task on Ant to compile about 1250 java files. It starts
> >fine, but after compiling several java programs ( about 20 of them) I
> >got a run-out-of-memory error. The message also suggests using a
> >switch  -J-mx<nmbs>. I cannot find any document mentioning such a
> >switch. Has any one encountered such a situation and got a solution to
> >this problem?
> The javac command runs under the same JVM as ant itself.  If you give
> ant more memory, it will pass it on to javac.  What I found to work is
> to modify one of the batch files in the bin directory (ant.bat, ant,
> etc) and add the -mx and -ms options on the call to java ($JAVACMD).
> For example, this is the last line of my ant shell script where I set
> the memory size:
> $JAVACMD -mx65536000 -ms65536000 -classpath "$LOCALCLASSPATH" $ANT_OPTS
> "$@"

Rather than modifying the scripts, try setting ANT_OPTS to contain the
memory-increase flags (as appropriate for the JVM version you're running).



Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

View raw message