ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Freeman <RFree...@globalrecall.com>
Subject RE: Access environment variables
Date Tue, 17 Oct 2000 13:39:05 GMT
Stefan, if Java cannot access the environment directly, would it not be
possible to create a JNI interface that calls the underlying C call, e.g.
getenv() ?

(Sorry if this falls off topic)

Russ
-----Original Message-----
From: Peter Breitling [mailto:breitlip@informatik.tu-muenchen.de]
Sent: 17 October 2000 16:38
To: ant-user@jakarta.apache.org
Subject: Re: Access environment variables




Hum, i feared that. But then i need a wrapper script and this is not
elegant. Is there a reason for this design?



Stefan Bodewig wrote:
> 
> >>>>> "PB" == Peter Breitling <breitlip@informatik.tu-muenchen.de>
writes:
> 
>  PB> I want to access %J2EE_HOME% environment in a portable way.
> 
> Unfortunately there is no portable way to access environment variables
> in Java, sorry. You'll need to invoke Ant from a wrapper script with
> something like
> 
> ant -DJ2EE_HOME=%J2EE_HOME%
> 
> or
> 
> ant -DJ2EE_HOME=${J2EE_HOME}
> 
> Stefan

-- 
Peter Breitling
_________________________________________________________________
				http://www.in.tum.de/~breitlip

Mime
View raw message