You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Manav Gupta <Ma...@cramer.com> on 2003/06/09 15:13:13 UTC
CreateProcess failure with ant
Hi,
I am a novice with ant and have written a simply build file to deploy the
web app to tomcat. The build fails with the following message:
BUILD FAILED
file:D:/manav/cramer/Cramer5/Prototype2/build.xml:237: java.io.IOException:
CreateProcess: cmd /c startup error=267
The build.xml file (line 237) reads:
<TCstartup dir="${tomcat.home}"/>
TCstartup is defined within the same file as (long before it is actually
called):
<taskdef classname="TCstartup" classpath="${support.dir}" name="TCstartup"/>
the execute() of TCstartup.java has:
public void execute() throws BuildException {
try {
/* dir must be specified */
if (dir == null) throw new BuildException("dir parameter is
required");
/* Launch tomcat */
File dirf = new File(dir + "/bin");
String[] cmd = new String[3];
cmd[0] = "cmd";
cmd[1] = "/c";
cmd[2] = "startup";
Process proc = Runtime.getRuntime().exec(cmd, null, dirf);
proc.waitFor();
}
catch (Exception ex) {
throw new BuildException(ex);
}
}
TCstartup.java behaves if I run it standalone (after removing all references
to ant, of course). Any clues?
Many Thanks,
M
Re: CreateProcess failure with ant
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
On Mon, 9 Jun 2003 11:13 pm, Manav Gupta wrote:
> Hi,
>
> I am a novice with ant and have written a simply build file to deploy the
> web app to tomcat. The build fails with the following message:
>
> BUILD FAILED
> file:D:/manav/cramer/Cramer5/Prototype2/build.xml:237: java.io.IOException:
> CreateProcess: cmd /c startup error=267
Error 267 is
#define ERROR_DIRECTORY 267
So probably a directory does not exist somewhere it should.
Conor
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org