ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Preston L. Bannister" <pres...@home.com>
Subject RE: <exec> task on NT/2000
Date Sun, 28 Jan 2001 01:50:03 GMT
> David.Bailey@lawson.com wrote:
> > We've moved from a makefile system (GNUmake on UNIX, NMAKE on
> > Windows) to ant, and on the whole we're happy with it.
> > However, we have discovered an irritating
> > feature of the <exec> task.
> >
> > If I call
> >
> >      <exec executable="perl">
> >           <arg value="foo.pl" />
> >      </exec>
> >
> > then (I believe) ant passes "perl foo.pl" to the command line,
> > and Windows knows what to do with it.  Even though I passed
> > "perl" and not "perl.exe", it still launches foo.pl correctly.


From: Bill Burton [mailto:billb@progress.com]
> Evidently perl.exe is in your path.  The automatic handling of .exe's
> could quite possibly be built into the Windows CreateProcess function.
>
> If you had the .pl suffix mapped to the path of your perl.exe so Windows
> knows how to deal with .pl files when it gets the "Open" action, you could
> probably run the script directly:
>     <exec executable="foo.pl"/>


I don't believe this works, as the JVM would need to call
the Win32 ShellExecute() API (the Windows "shell" understands
file extension associations).  I believe the JVM calls the
Win32 CreateProcess() API instead.

OTOH - I can't say I've re-tested this on Java 1.3 ...


Mime
View raw message