From 443354b965f807684a34de22b759f4c0c9341a73 Mon Sep 17 00:00:00 2001 From: Jan Materne Date: Mon, 31 Aug 2009 05:27:02 +0000 Subject: [PATCH] Hints for handling errors 'CreateProcess error=2' on Windows. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@809463 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/exec.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/manual/CoreTasks/exec.html b/docs/manual/CoreTasks/exec.html index e0a9b46b9..547f36eb1 100644 --- a/docs/manual/CoreTasks/exec.html +++ b/docs/manual/CoreTasks/exec.html @@ -72,6 +72,15 @@ types listed in the environment variable PATHEXT. That is only used by the shell </target> +

A common problem is not having the executable on the PATH. In case you get an error +message Cannot run program "...":CreateProcess error=2. The system cannot find +the path specified. have a look at your PATH variable. Just type the command directly on +the command line and if Windows find it, Ant should do it too. (Otherwise ask on the user mailinglist for help.) If Windows can not execute the program add the directory of the programm +to the PATH (set PATH=%PATH%;dirOfProgram) or specify the absolute path in the +executable attribute in your buildfile. +

+ +

Cygwin Users

The <exec> task will not understand paths such as /bin/sh for the executable parameter. This is because the Java VM in which Ant is