ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Smith <mich...@sneakerlabs.com>
Subject Re: javadoc/NT : Task not working
Date Mon, 31 Jan 2000 16:43:00 GMT
Stefano Mazzocchi wrote:
> Question: what's the point of going thru runant.bat anyway? before, I
> called javadoc directly from runtime.exec() and had no problems.
> 
> This is why I patched Exec() to be able to "bypass" that shell
? wrapping.
> 
> Sorry, but I miss that point.

I can't be 100% certain, because I didn't implement this stuff for Ant,
but...

See bug #4081777 (closed in favor of #4109888)

http://developer.java.sun.com/developer/bugParade/bugs/4081777.html
http://developer.java.sun.com/developer/bugParade/bugs/4109888.html

This workaround is to set the current working directory (the "dir" on
property the Exec task) to execute the process in.  Without the script/batch
file, the process runs in whatever directory the JVM wants to (probably the
directory the JVM was started in).

The bug is "fixed" in JDK 1.3 by the addition of a File argument to the exec
method to specify the directory the process should be executed from.


As for the limit of 8 or 9 command line arguments in NT, this can be worked
around in the batch file with the following (note: I don't think this works
on windows 95/98):

RCS file: /home/cvspublic/jakarta-ant/src/bin/antRun.bat,v
retrieving revision 1.2
diff -r1.2 antRun.bat
3,4c3,16
< echo %2 %3 %4 %5 %6 %7 %8 %9
< %2 %3 %4 %5 %6 %7 %8 %9
---
> shift
>
> set ARGS=
>
> :ARGLOOP
> if "%1"=="" goto ARGLOOPDONE
> set ARGS=%ARGS% %1
> shift
> goto ARGLOOP
>
> :ARGLOOPDONE
>
> echo %ARGS%
> %ARGS%

Regards,
michael
-- 
michael@sneakerlabs.com
http://www.sneakerlabs.com

Mime
View raw message