ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Rosengren <>
Subject RE: Accessing environment variables
Date Thu, 12 Apr 2001 15:22:50 GMT
There are many better examples in the achieves of this newgroup, but here's
what I do.

  <property environment="env" />
  <property name="javapath"  value="${env.JAVA_HOME}"/>

You don't have to use the string "env". You can call it anything you'd like.

-----Original Message-----
From: Jim Downing []
Sent: Thursday, April 12, 2001 11:17 AM
Subject: Accessing environment variables

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?


View raw message