--- Myron Uecker <[EMAIL PROTECTED]> 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
> org.apache.tools.ant.Main "$@"

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

Diane

=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to