ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: heap size
Date Thu, 21 Mar 2002 19:26:08 GMT
Oops. Should have left the fork="yes" attribute. Otherwise the memory stuff
is ignored. -DD

Setting the memory params of the VM running ANT also works of course, as
Diane suggested. Do java -X at the prompt.

$ java -X
...
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size

For example, on Windows, the equivalent would be:

set ANT_OPTS=-Xmx1024 -Xms512

I'm not sure whether you need quotes or not. --DD

 -----Original Message-----
From: 	Dominique Devienne [mailto:DDevienne@lgc.com] 
Sent:	Thursday, March 21, 2002 1:20 PM
To:	'Ant Users List'
Subject:	RE: heap size

Use something like below (512m <=> 512 Megabytes) for your compiles that
requires lots of memory 'cause involves lots of code:

    <javac srcdir="${src}"
           destdir="${classes}"
           fork="yes"
           ...
           memoryInitialSize="512m"
           memoryMaximumSize="1024m"
           source="${javac.sourceflag}" >

--DD

 -----Original Message-----
From: 	Diane Holt [mailto:holtdl@yahoo.com] 
Sent:	Thursday, March 21, 2002 12:51 PM
To:	Ant Users List
Subject:	Re: heap size

--- Kailash.Subramanian@alltel.com wrote: 
> I am using ANT to build our source code for the first time. I am getting
> the following error. Any idea how do I increase the heap size when using
> ANT ?
> 
>  [javac] ^
>  [javac] The compiler has run out of memory.  Consider using the
> "-J-mx<number>" command line option to increase the maximum heap size.
> 
> BUILD FAILED
> 
> Appreciate any help.

>From the "Running Ant" section of the user manual:
  ANT_OPTS - command-line arguments that should be passed to the JVM.
  For example, you can define properties or set the maximum Java
  heap size here. 

(Probably deserves an FAQ entry, though.)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards(r)
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message