If you know where the executable is located, you could set the "executable" attribute of <exec>. Or set the "dir" attribute tot he directory containing the executable you want to start. Or provide a nested <env key="Path" .../> element.
Jan -----Ursprüngliche Nachricht----- Von: Alan Snyder <contagiousarrow...@cbfiddle.com> Gesendet: Samstag, 19. Dezember 2020 22:46 An: Ant Users List <user@ant.apache.org> Betreff: a tricky case of running an executable from an ant build script I have an ant script that runs an executable without specifying the full path of the executable. If I run ant from the shell, then it finds the executable on my $PATH, which is what I want. (I do not specify searchpath=“true”, so perhaps I do not understand what that does, or the documentation is wrong.) The case of interest is where I perform the build directly within a Java application process. When I do this, the $PATH that the build script sees is the $PATH of the application, and presumably that is the $PATH that is used to find the executable. Unfortunately, if my application is a bundled macOS application, it has a minimal $PATH: /usr/bin:/bin:/usr/sbin:/sbin Is there a way that within my application I can configure ant with a different $PATH to provide to the build script, so that it will find the executable? --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org