ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn McAllister <gl...@somanetworks.com>
Subject Re: Accessing environment variables
Date Thu, 12 Apr 2001 22:19:41 GMT
Jim Downing wrote:

> Hi.
> I'm a complete Newbie to Ant. I'm trying to construct a simple ant build file to replace
the script based approach I was using. Is it possible to access OS
> environment variables (such as JAVA_HOME) as properties in build.xml, or do you have
to re-specify them fully as properties in build.xml?
>
> thanks,
> Jim

<property environment="your_prefix_here" />

<echo>
The value of the JAVA_HOME environment variable is
${your_prefix_here.JAVA_HOME}
</echo>

Glenn

Mime
View raw message