Heres an example put it at the top of your script..
<project name="myproject" default="compile" basedir=".">
<property environment="env" />
After putting this line in your scripts you can access environmental vars
like so..
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<echo message="OS: ${os.name}"/>
<echo message="${ant.version}"/>
<!-- Create the build directory structure used by compile
-->
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
<!-- Display java home -->
<echo message="Java home: ${env.JAVA_HOME}" />
</target>
-----Original Message-----
From: Pravin Pillai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 7:18 PM
To: Ant Users List
Subject: Environment Variable
Guys:
Can i access an environment variable using ant???
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>