ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Shell portability
Date Wed, 09 Feb 2000 13:37:58 GMT

Ludovic Claude wrote:
> cmd and the && operator are not supported by the win 95/98 os.
> Those systems use command to run their batch processes, and it's not
> possible to run more than one command on one line. My guess is that
> it is necessary to generate on the fly the .bat that will be able to
> execute Exec tasks, because the system puts too many constraints on
> the way we can write batch (limit of 9 arguments, limit of 255
> characters for the command line).

I'm not thrilled with dynamically writing the batch files/shell scripts,
because of the error cases involved (path not found, user not authorized,
disk is full, garbage left around after failure, ...).    But as a last
resort, I guess it is OK.

255 is the limit?  Yeck.  This could clearly affect Javadoc, even when no
cd is required.  Are you sure that this limit doesn't apply to batch files?

> If you agree with this approch, then i can volunteer to write and test
> this (sometime next week).

I'm pretty happy with the current approach for NT, so if odd things are
required for 95/98, I'd like those code paths to be executed only for those

Something else to experiment with - I observed that "command cd \dir" would
change the working directory in the parent process on 98 (this testing was
done from the command line, not from within Java, so it may not apply
here).  If so, issuing three commands (cd, exec, cd) could do the trick.

- Sam Ruby

P.S.  I'm experimenting with an approach which will eliminate antRun for
Unix.  RunTime.Exec("sh"), pipe the desired commands to standard input.

View raw message