ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Wood <kw...@i2.com>
Subject Re: build.exe
Date Fri, 13 Jul 2001 12:28:12 GMT
I presume this approach is platform independent?

ant.bat is "dos"

ant.sh is "unix"

build.exe is "dos"

Your approach I like best if it runs anywhere as I expect it
should.

Adam Murdoch wrote:
> 
> Hi,
> 
> I put together a Java-based launcher a while ago, plus a task which builds
> custom application launchers.  The launchers are assembled into Jar files
> that can be run with "java -jar".
> 
> A quick description of what the launcher does:
> 
> When the launcher starts up, it builds up a classpath from the system
> classpath, plus whatever .jar and .zip files it finds in various
> directories.  The directories to search are customisable, and can be
> specified as an absolute path, a path relative to the working dir, or a path
> relative to the directory containing the launcher Jar.
> 
> It includes some hackery to locate tools.jar and add it to the classpath, if
> needed.
> 
> Once the classpath is built, the launcher invokes the main() method of the
> app's main class.  The main class name is customisable.
> 
> I have used the task to build launchers for a bunch of apps, including ant.
> No need to set JAVA_HOME or ANT_HOME - it figures it all out.
> 
> I feel it would be useful for ant to provide a task like this.  Every Java
> app has - to some degree or other - the same problems that ant has with
> launching itself.  Whatever solution ant comes up with, we should try to
> make generally available.
> 
> I can send in what I have.  It needs some work to fit a little better with
> ant.  In particular, it uses some Java 2 stuff, to locate the launcher Jar,
> and to build a classloader.  I think AntClassLoader could be used instead
> (need to abstract out the dependency on a Project).
> 
> Adam
> 
> > -----Original Message-----
> > From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
> > Sent: Sunday, 8 July 2001 9:26 AM
> > To: ant-dev@jakarta.apache.org
> > Subject: Re: build.exe
> >
> >
> > From: "Nico Seessle" <nico@seessle.de>
> > > Others: Do you think it would be useful to add this (as ant.exe) to the
> > Ant
> > > Distribution, so we can avoid future problems with ant.bat?
> > >
> >
> > I'm happy to have it in there as source, but I think the real solution is
> > to move this processing into Java code, not C++. That is the
> > approach taken
> > by most of the Ant2 proposals. I might play around with a Java based
> > launcher.
> >
> > Conor
> >
> >
> >

Mime
View raw message