I personally dislike the requirement for environment variables (or other
external inputs) in a build; the build should be self-contained. If
another developer comes along without ANT_OPTS set up and attempts to
build your project they will get the OoM Exception and waste time
tracking the issue down.

I recommend building the required sizes into your script and using fork.

Phil :n.

On Wed, 2005-03-02 at 14:24, Kenneth Wood wrote:

> As someone suggested earlier, define ANT_OPTS in your environment
> (read the Ant documentation about using ANT_OPTS)
> 
> For example, we use
> 
>     ANT_OPTS="-Xmx1024m -Xms256m"
> 
> Then you can compile without the need to use "fork".
> 
> From my build log, compiling more files than your case of 496 files:
> 
> javac:
>     [javac] Compiling 643 source files to ...
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 01, 2005 6:15 PM
> To: [EMAIL PROTECTED]
> Subject: DO NOT REPLY [Bug 33162] - OutOfMemoryException when compiling
> a large project
> 
> 
> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG*
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://issues.apache.org/bugzilla/show_bug.cgi?id=33162>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND* INSERTED IN
> THE BUG DATABASE.
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=33162
> 
> 
> [EMAIL PROTECTED] changed:
> 
>            What    |Removed                     |Added
> ------------------------------------------------------------------------
> ----
>              Status|NEW                         |RESOLVED
>          Resolution|                            |FIXED
> 
> 
> 
> 
> ------- Additional Comments From [EMAIL PROTECTED]  2005-03-02 01:15
> -------
> I used the javac "fork" option with "memoryMaximumSize=800m" and it
> worked fine.   
> Now I feel silly.   
>   
> Anyone know how to pass to javac -Xmx800m without forking?  
>    

-- 
Phil Weighill-Smith <[EMAIL PROTECTED]>
Volantis Systems

Reply via email to