ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David W Forslund <>
Subject Re: Classpath issues
Date Tue, 25 Jul 2000 15:25:37 GMT
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.

 > Louis Tribble
 > -- 
 > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
 > Louis Tribble                               
 > Metamata, Inc.                         
 > Tools for serious Java developers.                       +1 510 796 0915
 > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

View raw message