You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stephane Bailliez <sb...@imediation.com> on 2001/01/16 17:39:08 UTC

Execute task: need info

Can someone enlighten me on what's the difference between a CommandLauncher
in JDK 1.1 and in JDK 1.2 ?

I cannot see what drives the need of using CommandLauncher for JDK 1.2 and
JDK11CommandLauncher for JDK 1.1

The only difference is the quoting that occurs in JDK11CommandLauncher, but
this should be set in all CommandLauncher.

Unless I missed something it should be quoted on all platforms and all JDKs.

I will post a patch for this as soon as I have these info.

-- 
 Stéphane Bailliez 
 Software Engineer, Paris - France 
 iMediation - http://www.imediation.com 
 Disclaimer: All the opinions expressed above are mine and not those from my
company. 

Re: Execute task: need info

Posted by Stefan Bodewig <bo...@apache.org>.
Stephane Bailliez <sb...@imediation.com> wrote:

> I cannot see what drives the need of using CommandLauncher for JDK
> 1.2 and JDK11CommandLauncher for JDK 1.1
> 
> The only difference is the quoting that occurs in
> JDK11CommandLauncher, but this should be set in all CommandLauncher.

No.

We are using Runtime.exec(String[]) to launch the external
process. When doing so, command line arguments have already been split
into separate items and you don't need to quote them anymore - so much
much for the theory. Sun's JDK 1.1 on Windows has bug here, so quoting
is necessary.

Using quotes regardless is going to cause havoc (at least on Unix
systems) as these will not be stripped by the shell and become part of
the actual arguments.

Am I making sense?

Stefan