Louis Tribble writes: > David Forslund wrote: > > > > Thanks for doing this! It seems that if I set CLASSPATH this way then I > > lose my PATH environment variable. > > It seems that if I set one environment variable, I need to set them > > all. Is this how you see it working? > > I can't speak for the _wishes_ of the Ant developers, but that behavior > is inherited from Runtime.exec(): if you omit the envp argument, the > current environment is passed to the subprocess; if you do, only the > name-value pairs you actually specify are passed. > > I can't think of a decent portable way to do better, but making the > required environment variables explicit seems like better style anyways. >
Indeed, this is the case. I can get the PATH environment from the java.library.path property. When I set my PATH to that, it all works. This is not a problem, but something one must be aware of. > It might help some people if the ant scripts on platforms where it makes > sense (Windows, Unix) passed PATH in as a system property so it's > available for passing to subprocesses. > thanks, Dave > Louis Tribble > -- > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > Louis Tribble [EMAIL PROTECTED] > Metamata, Inc. http://www.metamata.com > Tools for serious Java developers. +1 510 796 0915 > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
