ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Otto Perdeck" <>
Subject How to check availability of an executable?
Date Mon, 25 Feb 2002 11:46:12 GMT

I need to check whether certain executables are available in my Ant build
script. Depending on availability, parts of the build would be executed or

On Unix-likes, I could "exec" a "where <name_of_tool>" and redirect output
to a property. Since "where" is silent when not found, this could work. For
non-Unix boxes, I could (and have done so) create a trivial Java program
that takes PATH and the tool name, and searches for an existing file along
the path.

But this is all very inconvenient. It would be much better if the
<available> task, or the <available> nested element of <condition> would
allow me to test for the availability of any given executable.

Anyone aware of the existence of such an Ant task? Or an alternative way to
express this in Ant?

Thanks a lot

-Otto Perdeck

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message