I have the following snippet in my Ant script. It executes just fine:
<exec executable="C:\test\foo\programName.exe" />
But then when I try to execute it by setting the directory, like so:
<exec executable="programName.exe"
dir="C:\test\foo\" />
I get:
Execute failed: java.io.IOException:
Cannot run program “programName.exe”
(in directory “C:\test\foo”):
CreateProcess error=2, The system
cannot find the file specified
Please help! Why is it not working when the directory is specified separately?
I ended up sticking with this: