Hi,
You need to specify minimum amount of heap memory for the JVM that runs the
ant command.
Use something like - set JAVACMD=java -Xms100000000 -Xmx150000000 - on
command line
or just edit your ant.bat/shell script (adjust the memory limits to your
needs).
Albert
----- Original Message -----
From: <joseph.chandler@franke.com>
To: <ant-user@jakarta.apache.org>
Sent: Tuesday, March 13, 2001 5:49 PM
Subject: Out of Memory
> I am getting an out of memory error from Javac. I typed javac to see the
> usage and there were no memory flags. I know that the vm has them and
some
> static compilers like Jet use them but I've never seen the need before
with
> javac.
>
> I just compiled the whole project with JBuilder4. Then, I shutdown
> everything to make sure I had as many free resources as possible. I'm
> running on a PIII 750 with 512M. This really shouldn't be an issue. The
> output follows: Any help you guys can offer will be greatly appreciated :
> -)
>
> [FHU02N\Chandler] J:\pbs> ant
> Buildfile: build.xml
>
> init:
>
> compile:
> [javac] Compiling 844 source files to J:\pbs\build
> [javac]
> [javac]
> [javac] The system is out of resources.
> [javac] Consult the following stack trace for details.
> [javac]
> [javac] java.lang.OutOfMemoryError
> [javac] <<no stack trace available>>
>
> BUILD FAILED
>
> J:\pbs\build.xml:27: Compile failed, messages should have been provided.
>
> Total time: 27 seconds
>
>
>
>
> The build.xml file that I use is here
> |
> |
> V
>
>
> <?xml version="1.0"?>
>
> <project name="PBS" default="dist" basedir=".">
>
> <!-- set global properties for this build -->
> <property name="src" value="."/>
> <property name="build" value="build"/>
> <property name="dist" value="dist"/>
> <property name="lib.jar" value="./lib.jar"/>
> <property name="optimize" value="false" />
> <property name="debug" value="off"/>
>
>
> <target name="init">
> <!-- Create the time stamp -->
> <tstamp/>
> <!-- Create the build directory structure used by compile -->
> <mkdir dir="${build}"/>
> </target>
>
> <target name="compile" depends="init">
> <!-- Compile the java code from ${src} into ${build} -->
> <javac srcdir="${src}" destdir="${build}"
> classpath ="${lib.jar}"
> debug="${debug}"
> optimize="${optimize}"
> deprecation="off" >
> </javac>
> </target>
>
> <target name="dist" depends="compile">
> <!-- Create the distribution directory -->
> <mkdir dir="${dist}/lib"/>
>
> <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file
> -->
> <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar"
basedir="${build}"/>
> </target>
>
> <target name="clean">
> <!-- Delete the ${build} and ${dist} directory trees -->
> <delete dir="${build}"/>
> <delete dir="${dist}"/>
> </target>
> </project>
> ______________________________
> Joseph Chandler
> Software Engineer
> Franke Holding USA
> 305 Tech Park Drive
> La Vergne, TN 37086
> USA
> Switchboard: +1-615-287-8243
> Fax: +1-615-287-8343
> mailto:joseph.chandler@franke.com
> http://www.franke.com
>
|