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-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org