ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KKnautiyal <>
Subject Re: How to increase memory used by JVM in Ant
Date Fri, 07 Aug 2009 13:05:45 GMT

Hi All,

There are two way to increase memory size for ant:

1. Setting the value of ANT_OPTS property in environment var. eg: ANT_OPTS 
=  -Xmx512M.
2. Specifying maxmeory attribute in in ant Java target. 

target name="MergingHugeJars" >
    <echo message="Merging jars ${InputJars} into ${OutputJar}"/>
    <java jvm="${JVM}" classname="com.krishna.test.MergeHugeJars"
fork="true" failonerror="true" maxmemory="512m" >
            <arg line="${OutputJar} ${InputJars}"/>

Here maxmemory is the way to pass the maxmemory to JVM at run time.

Thanks & Regards,

zw wrote:
> Hi
> What's the complete command string example to increase memory used by JVM
> in
> Ant 1.7  ?
> What's the min and max memory size for this ?
> Thanks

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message