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 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 11:17 AM
To: [EMAIL PROTECTED]
Subject: Accessing environment variables


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

Reply via email to