java and javac will fork or not as described in the Manual for those
tasks. As described there, they will not fork unless you use the fork
attribute to turn on forking.

Using fork="false" (the default) is more efficient, but makes the
execution tightly bound to your Ant environment, and doesn't allow for
much customization of the JVM environment. It's impossible to set system
properties for just this task, and very tricky to narrow down the
classpath with fork false, for example.


Scot P. Floess wrote:
>
> I didn't think a separate JVM was started for the javac task...
>
> Not sure about invoking it programatically (never done that), but I
> wouldn't think so... That would imply using java.lang.Runtime.exec()
>
> On Fri, 16 Jan 2009, robert lazarski wrote:
>
>> On Fri, Jan 16, 2009 at 12:11 PM, Scot P. Floess <sflo...@nc.rr.com>
>> wrote:
>>>
>>> I don't think setting the property as you have done is exactly
>>> correct... At
>>> least once the JVM is up and running... I'd definitely set JAVA_HOME in
>>> your environment first...before running...
>>>
>>
>> Invoking ant programatically starts another jvm, doesn't it? It
>> certainly does when I invoke javac from a typical ant "compile" task
>> and run a main() program, right?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
>> For additional commands, e-mail: user-h...@ant.apache.org
>>
>>
>
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC 27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM http://sourceforge.net/projects/javapim
>
> Architect Keros http://sourceforge.net/projects/keros
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to