ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn McAllister <>
Subject Re: <exec> task on NT/2000
Date Fri, 26 Jan 2001 16:49:34 GMT wrote:

> I understand that this problem likely exists due to the platform-specific nature
> of the Java "Runtime.getRuntime().exec" method underlying the <exec> task.  But
> isn't it possible to modify the logic for the <exec> task to handle this, so
> that if I pass "bar" as an attribute in the <exec> task, then ant passes the
> "Right Thing" to the OS to execute it?  Just wondering.

Care to define what the "Right Thing" is?  :-)

In Windows, the right thing is that if you try to run the command and it chokes,
try "command.bat".  Or is it "command.cmd"?  Depends on the version of Windows.

What about a shell script?  If "command" chokes, do we try ""?  .sh isn't
actually a hard and fast convention to the best of my knowledge.

We want to keep the amount of OS specific code to a minimum.  Trying to do an OS
dependent decision tree is not the best way to acheive platform independence, IMHO.

Glenn McAllister

View raw message