ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nisha Pillai <npil...@teja.com>
Subject Re: -J option <javac> task question
Date Wed, 30 Apr 2003 16:53:57 GMT
Stefan Bodewig wrote:

>On Tue, 29 Apr 2003, Nisha Pillai <npillai@teja.com> wrote:
>
>  
>
>>   Thanks for your input. This worked.
>>    
>>
>
>Strange, as it shouldn't work.  If setting ANT_OPTS solves your issue,
>then you are not forking javac.  The maxmemory attribute will only
>apply if you set fork to true.
>
>If you don't fork, javac will run in the same Java VM instance that is
>running Ant and your only option is to increase the memory size for
>this VM - which in turn can only be done before Ant has been started
>(via ANT_OPTS or ~/.antrc).
>
>Stefan
>  
>
Stefan,
    I understand that maxmemory will only work with fork. Per the 
snippet I included in my original post, I am setting fork=yes in my 
javac task. And before someone says to try fork=true, I've tried that as 
well. Anyways, here is the javac part from my buildfile again.

  <target name="compile" depends="init" description="compile the source " >
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}" debug="on" fork="yes" 
memoryMaximumSize="128m">
      <classpath>
      <fileset dir="${maindir}/external_jars" includes="**/*.jar"/>
      <pathelement path="${java.class.path}/"/>
      </classpath>
    </javac>
  </target>
 
Realized when I saw ANT_OPTS working that fork wasn't working, but I'm 
not sure why. Anyone?
And no, I'm not setting the build.compiler property.
- Nisha.



Mime
View raw message