You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jason Rogers <ja...@tumbleweed.com> on 2001/08/14 20:47:36 UTC

java switches

I am pretty sure this has been covered but I can't find it on the archives.

I am trying to build a pretty large project, and am running out of memory.
Therefore, I would like to up the max memory of java.  How can I set the
-Xmx switch when invoking Ant?

Java - J2SE 1.3.0_02
OS   - Solaris 2.7

The error I get on the command line is:
"java.lang.OutOfMemeoryError: requested <N> bytes" (where 'N' varies)

Thanks.

____________________________________________________________________
Jason Rogers                                     734-769-5900 x 1449
Software Engineer                               5855 Interface Drive
Tumbleweed Communications                        Ann Arbor, MI 48103

"[Innovation]...takes people willing to do what's not expected." - Jean
Riboud


Re: java switches

Posted by Glenn McAllister <gl...@somanetworks.com>.
Jason Rogers wrote:

> I am pretty sure this has been covered but I can't find it on the archives.
>
> I am trying to build a pretty large project, and am running out of memory.
> Therefore, I would like to up the max memory of java.  How can I set the
> -Xmx switch when invoking Ant?

Set the environment var ANT_OPTS, like

ANT_OPTS="-Xmx128M"
export ANT_OPTS

in your .profile/custom build.sh/whatever...

Glenn McAllister
SOMA Networks, Inc.