ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manav Gupta <Manav.Gu...@cramer.com>
Subject CreateProcess failure with ant
Date Mon, 09 Jun 2003 13:13:13 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message