Monday, May 30, 2011

IOException: Cannot run program "xxx" in Windows in ANT

IOException: Cannot run program "xxx": CreateProcess=2

The clue is located in the documentation of ant. It is said that ".bat files cannot in general by executed directly. One normally needs to execute the command shell executable cmd using the /c switch".

You could solve your problem with
1) cmd -c xxx.bat - for general batch problems
2) if it calls java program, create ant taskdef for the program.

No comments:

Post a Comment