DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32066>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32066

<exec> favours .exe over .com

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From [EMAIL PROTECTED]  2004-11-05 08:58 -------
This is not part of ant, this is the documented behaviour of the Win32 API call 
::CreateProcess

"If the file name does not contain an extension, .exe is appended. Therefore, if
the file name extension is .com, this parameter must include the .com 
extension."

We are just calling exec() in the Java runtime, clearly the runtime itself is
calling ::CreateProcess underneath. 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp

I therefore do not believe it is a bug, either in Ant or Java. 

The fact that the shell behaves differently is because it (presumably) looks
through the value of %PATHEXT%, which on my XP box is .COM;.EXE;.BAT;.CMD;.PL;
(note I deletes all the WSH scripting junk and added perl). If you type in a
command on the command line, it will search through the list in that order till
it gets a match.

<exec> does *not* go through the shell, nor does Runtime.exec() that we use -so
we get the direct semantics of ::CreateProcess(). 

Marking as invalid, because it isnt a bug. We may want to clarify this fact in
the docs

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to