Hi,

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
/sapphire/users/sapbuild/ENV2/online/BUILD/sap_jar_input
  [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 ${ant.project.name}</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 ${ant.project.name}</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 http://www.polaris.co.in

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to