ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "External Lists" <>
Subject Re: Suggestion for Ant
Date Mon, 01 May 2000 00:33:23 GMT
> Unfortunately, Windows doesn't always work as one would expect.  If more
> than one command is executed on a process, you can't redirect the output.

For Windows NT at least, you can do the following:

      Runtime.getRuntime().exec( "cmd /c (dir /w && dir) 2>&1 > foo.out"

And all the output of both commands ends up in foo.out.  (The 2>&1 part is
only for getting stderr into foo.out as well as stdout.)

> Furthermore, cmd.exe doesn't exist on Win9X.

Very true, but it could be fudged less by switching on the property.
Not ideal, but better than figuring out how to get the ComSpec environment
variable into the JVM.

> If you can find a fix which produces the exact same output for the Javadoc
> task on win9x as the current code does, I would be very grateful.

I don't know what that output is, not having a win9x system.

View raw message