ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: out of memory error
Date Tue, 07 Feb 2006 06:10:33 GMT
<compilerarg>s are not present from the first time; they are introduced around four years
ago [1]. But 4 years - that shouldnt be the problem.
But which version of Ant are you using?



>-----Urspr√ľngliche Nachricht-----
>Gesendet: Dienstag, 7. Februar 2006 05:27
>Betreff: out of memory error
>My problem is I am getting out of memory error when I try to 
>compile java files( around 1200 ) to create a jar.
>I have some questions...
>* First time , when I tried to compile the java sources using 
>ant, I got following error.
>  [javac] Compiling 1162 source files to 
>  [javac] The compiler has run out of memory.  Consider using 
>the "-J-mx<number>" command line option to increase the 
>maximum heap size.
>Imp point : If I compile the sources using javac 
>-J-mx1000000000 -d $TEMP_SOURCE *.java command , I dont get 
>this out of memory error.
> Then when I tried to use
> <compilerarg                                     
> line="-J-mx1000000000"/>                         
> but I am getting some                            
> syntax errors like :                             
> The <javac> task doesn't                         
> support the nested                               
> "compilerarg"   element                          
> Following is the part of the build xml file, which I am using.
>  <target name="compile" depends="init">
>  <echo>Compiling ${}</echo>
>  <echo>class path ${classpathref}</echo>
>  <property name="classpathref" value="${jar_classpath}"/>
>  <mkdir dir="${sap_jar_input}"/>
>  <javac srcdir="${javacc}"
>        destdir="${class_dest}"
>   />
>   <echo>Finished compiling ${}</echo>
>   </target>
>   Would you please go through the above snippet & tell me how 
>to use <compilerarg line="-J-mx1000000000"/>  ???
>   Please suggest some better way of doing this if there is any.
>* I want to ask you one more question..
>   I need  to build the java files once in a while.
>   Now , sometimes when the build fails, I have to  take a 
>lower version of the failed file.
>   In that case if I am using javac -J-mx1000000000 -d 
>$TEMP_SOURCE *.java command from the unix prompt , I need to recompile
>   all the 1200 files.
>   How I can avoid this & compile only those previously failed 
>files in the second round & create the jar file ??
>   This will save a lot of time.
>  Thanks for your valuable time.
>   Prashant Chaudhary
>   Stock Options Services,
>   Polaris Software Lab Ltd - Mumbai.
>   1st CMM-i Level 5 company.
>   91-22-56482244
>This e-Mail may contain proprietary and confidential 
>information and is sent for the intended recipient(s) only. 
>If by an addressing or transmission error this mail has been 
>misdirected to you, you are requested to delete this mail immediately.
>You are also hereby notified that any use, any form of 
>reproduction, dissemination, copying, disclosure, 
>modification, distribution and/or publication of this e-mail 
>message, contents or its attachment other than by its intended 
>recipient/s is strictly prohibited.
>Visit Us at
>To unsubscribe, e-mail: For 
>additional commands, e-mail:

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

View raw message