ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pontarelli <br...@pontarelli.com>
Subject Re: changing directory in Ant
Date Mon, 29 Mar 2010 15:16:07 GMT
Depending on what you need, you might not be able to do this. Last time I checked there wasn't
a way in Java to change the directory of the JVM. The new file APIs in JDK 7 might fix this.

-bp


On Mar 29, 2010, at 1:49 AM, Irfan Sayed wrote:

> Hi all,
> 
> i need to change the directory while executing build.xml. i executed
> following code.
> 
> <target name="dirchange">
> <exec executable="cmd">
>                        <arg value="/c"/>
>                        <arg value="cd"/>
>                        <arg value="/tmp"/>
> </exec>
> </target>
> 
> but it is failing with the following error.
> 
> Buildfile: build.xml
> dirchange:
> BUILD FAILED
> /home/y/var/builds/workspace/DNA_Renaissance_Aggs/V08/trunk/build.xml:33:
> Execute failed: java.io.IOException: Cannot run program "cmd":
> java.io.IOException: error=2, No such file or directory
> Total time: 0 seconds
> please advice
> 
> Regards
> Irfan.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message