ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: cvs commit: jakarta-ant .cvsignore
Date Sat, 25 Nov 2000 14:59:54 GMT
At 06:56  25/11/00 -0800, you wrote:
>--- Peter Donald <> wrote:
>> To anyone whos anything about bat files is there a way to make the
>> ant.bat
>> behave the same as ant shell script under *nix. Specifically I want to
>> auto-detect ANT_HOME from location of script. So if the script is at
>> E:/blah/blee/ant/bin/ant.bat I want to automagically set ANT_HOME to
>> E:/blah/blee/ant. If we could do that then I know of quite a few projects
>> that could dump the need for a seperate build.[sh|bat]
>Along those lines (and I can't believe I'm asking this) but does anyone out
>there know where there is an online reference for the .bat file syntax? I
>tried " --help" and "info .bat" and they just didn't get me
>anywhere :-]
>Better yet, has anyone seen a more portable way of launching java programs
>on all platforms? Clould we tweak the Ant ClassLoader to do the .jar file
>searching after startup, so that "java -jar ant.jar" really does work? What
>do the MacOS people out there do?

We can only get this to work easily on 1.2+ platforms (as 1.2 was the one
that introduced the manifest entries to autolaunch jars). We could possibly
get a launcher built for 1.1 that mimicks that bahviour via extensive
reflection and a command line like "java -classpath ant.jar AntMain".
However there is two real problems; 

* We need to know about the ant bin directory to pick up the
antRun.[sh|bat] and this usually needs ...
* Access to environment variables (ie ANT_HOME|ANT_OPTS). 



| Despite your efforts to be a romantic hero, you will |
| gradually evolve into a postmodern plot device.      |

View raw message