Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
How to refer PATH environment variable in <exec > Ant task

How to refer PATH environment variable in <exec > Ant task

2006-12-02       - By Ravi Roy
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Hi All,



I want to refer the environment variable in created in Windows XP using
<exec> Ant task, but it does not seem to refer that.



My purpose is to run java.exe along with executing the application and
referring ZIP/JARs by the application at execution time from the PATH
variable.



<property environment="env" />



<target name="main">

         <exec dir="${project.root}/classes" executable="java.exe">

            <env key="PATH" path="${env.PATH} />

             <arg
line="-XrunpiAgent:mode=full,server=standalone,profile=myprofile,filters=myf
ilters.txt,file=trace.trcxml com.mycomp.test.MyApp" />

         </exec>

</target>



or there is some limit in terms of maximum characters specified on the
command line ?



Thanks for pointers in advance!



Regards.

Ravi.




















©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.