ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Sparks" <>
Subject RE: Controling the environment for exec tasks
Date Sat, 15 Jul 2000 12:51:13 GMT
I was just thinking the same thing. Actually,
java.lang.Runtime's exec method is overloaded
to take a string array with the environment
vars set in name=value syntax. I've used this

Unfortuately, the Exec taskdef doesn't make
use of this facility. 

Since many environment variables are pathnames,
it would be very handy if ant used it's
pathname conversion stuff to ensure paths worked
on all platforms.


> -----Original Message-----
> From: Julien Couvreur []
> Sent: 14 July 2000 22:30
> To: ant-dev@jakarApache. Org
> Subject: Controling the environment for exec tasks
> Hi,
> Somebody posted a message saying what he greatly enjoyed with Ant was the
> possibility of not depending on the system environment (ie CLASSPATH
> especially).
> You may want to call third-party scripts from ant, and these may 
> (and often)
> need to run in a special environment. So it would be nice if exec could
> specify env variables for the program that we exec.
> Unfortunately, maybe Java doesn't support changing environment 
> variables (it
> only allows reading, via System.getXxx()). Would there still be a way of
> doing this env variable setting ?
> Julien Couvreur
> RedCart, Enabling Digital Marketplaces.

View raw message