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 Fri, 02 May 2003 00:16:23 GMT
Since I haven't heard anything further, let me rephrase the question. Is 
there anything I need to do (outside of the invocation of the task, for 
example) in order to ensure that fork works in the javac task?
- Nisha.

Nisha Pillai wrote:

> 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