Hi,
Use the memoryMaximumSize attribute of the javac task (and set fork to
true as well).  This is an Ant question.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Richey, Ross [mailto:[EMAIL PROTECTED]
>Sent: Thursday, June 17, 2004 9:39 AM
>To: [EMAIL PROTECTED]
>Subject: Increasing compiler memory in Build.xml
>
>I'm using the webapp compilation script I found on
>http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html to
>compile a servlet zone.  But It appears that Javac is running out of
>memory:
>
>-----Output-----
>
>Buildfile: build.xml
>
>jspc:
>
>compile:
>    [javac] Compiling 16726 source files to
>/usr/local/tomcat/jakarta-tomcat-5/build/webapps/ROOT/WEB-INF/classes
>
>
>
>    [javac] The system is out of resources.
>    [javac] Consult the following stack trace for details.
>    [javac] java.lang.OutOfMemoryError
>    [javac] Compile failed; see the compiler error output for details.
>
>all:
>
>BUILD SUCCESSFUL
>Total time: 40 seconds
>
>-----/Output--------
>
>Ideally I'd like to include a directive in the build.xml to increase
the
>compiler heap, but I haven't been able to find any directive that does
>that.  What I have found are instructions for increasing the memory via
>the command line, '/usr/local/jdk1.4/bin/javac -J-Xms=256m
-J-Xmx=256m',
>but that returns:
>
>Invalid initial heap size: -Xms=256m
>Could not create the Java virtual machine.
>
>I'm running Redhat 7.3, Tomcat 5, Ant 1.6 and j2sdk 1.4.2.
>
>Ross Richey,
>Webmaster www.aruplab.com



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to