ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Deragon <>
Subject Newbie gets OutOfMemoryError.
Date Tue, 12 Mar 2002 03:04:43 GMT

   I am a newbie and get the famous OutOfMemoryError.  I want to try to 
avoid breaking up the building sequence and have all the source compiled 
under one single easy target.

   I tried many options regarding the javac task, but I get the feeling 
that it does not help much.  For instance, I have set the fork option to 
"asdf" and ant did not even complained.  I tried to specify with "modern" or "jikes", but again, I feel that this 
property is being ignored.  Regardless of the options/properties I set, 
ant seams to behave always the same way; consumes 100% CPU for 1m18s and 
then spits out the OutOfMemoryError.

   Appended, my build.xml.  Please feel free to suggest some 
improvements.  I use ant 1.4.1, jdk 1.4.0 and jikes 1.15.

Hans Deragon


<project name="antmm" default="compile" basedir=".">

   <!-- set global properties for this build -->
   <property name="src"             value="/usr/java/src"/>
   <property name="build"           value="/usr/java/classes"/>
   <property name="cache"           value="/usr/java/antcache"/>
   <property name="build.compiler"  value="jikes"/>

   <target name="init">
     <!-- Create the time stamp -->
     <!-- Create the build directory structure used by compile -->
     <mkdir dir="${build}"/>

   <target name="compile" depends="init">
     <!-- Compile the java code from ${src} into ${build} -->
     <javac fork="no" debug="on" verbose="on" destdir="${build}" 
memoryInitialSize="256m" memoryMaximumSize="256m">
         <pathelement path="${src}"/>

   <target name="clean">
     <!-- Delete the ${build} and ${dist} directory trees -->
     <delete dir="${build}"/>

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

View raw message