ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: How to extend directories to PATH?
Date Sat, 06 Sep 2003 18:36:34 GMT
Zsolt,

You cannot modify the PATH of a running process thru Java only. You need
native code to do that. The java process running Ant is not different. What
you can do that Ant is explicitly set the PATH of sub-processes you <exec>
from Ant. Is that clearer?

You can also extend the PATH before calling Ant, thru a custom Ant startup
script. Lots of people do that. --DD

> -----Original Message-----
> From: Zsolt Koppany [mailto:zkoppanylist@intland.com]
> Sent: Saturday, September 06, 2003 1:59 AM
> To: Ant Users List
> Subject: Re: How to extend directories to PATH?
> 
> 
> Matt,
> 
> I have an ant script that executes a lot of commands, thus I 
> would like
> to add some directories to the PATH environment variable for the time
> the ant script runs and I need a solution where I can modify PATH for
> the lifetime of the script.
> Because I don't start ant view an "exec" call but use its Java API, I
> could also do that via the API (if I knew how). 
> 
> Zsolt
> 
> On Fri, 2003-09-05 at 21:29, Matt Benson wrote:
> > Permanently?  Or just long enough to execute some
> > external commands?
> > 
> > -Matt
> > 
> > --- Zsolt Koppany <zkoppanylist@intland.com> wrote:
> > > Hi,
> > > 
> > > how can I add directories to the environment
> > > variable PATH? I need a
> > > solution for Windows and Linux. I use the Java API
> > > of Ant, thus I can do
> > > that via Java.
> > > 
> > > Zsolt

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


Mime
View raw message