ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Deragon <h...@deragon.biz>
Subject Re: Newbie gets OutOfMemoryError.
Date Wed, 13 Mar 2002 00:18:42 GMT
Hi.


   It fails again.  I have only 136 .java files to compile, but it 
fails.    Running ant with -v -debug options shows that ant seams to 
ignore the javac options (I do not see any reference to fork for 
instance).   Following your instructions, this is the build.xml I used:

<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="modern"/>

   <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 fork="true" debug="on" verbose="on" destdir="${build}" 
memoryInitialSize="256m" memoryMaximumSize="256m">
       <src>
         <pathelement path="${src}"/>
       </src>
     </javac>
   </target>

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


Thanks,
Hans Deragon

Diane Holt wrote:

> --- Hans Deragon <hans@deragon.biz> wrote:
> 
>>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.
>>
> 
> You just kept bumping up against Catch-22's -- you can't use the
> memory*Size attributes unless you use fork="true", and you can't use fork
> and run the Jikes compiler :)
> 
> Try running Ant itself with more memory by setting the ANT_OPTS env var to
> whatever the memory-increase flag is for the version of Java you're
> running (eg., ANT_OPTS=-Xmx256m).
> 
> Diane
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.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>


Mime
View raw message