ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: Controling the environment for exec tasks
Date Mon, 17 Jul 2000 15:10:27 GMT
Julien Couvreur wrote:
> 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 ?

You can pass in environment variables using Runtime.exec (only affects
the subprocess, not the calling VM!). This ought to work on Windows and
Unix both without any wrapper scripts, AFAIK. Also in 1.3 *only* you can
set the working directory for the subprocess as well (you could test for
this ability using introspection on Runtime.class).


Jesse Glick   <>
NetBeans, Open APIs  <>
tel (+4202) 3300-9161 Sun Micro x49161 Praha CR

View raw message