I don't claim to understand the details of what ant-launcher is supposed to do, but if I do:

cd ${ant.home}/lib
jar xf ant.jar
jar xf ant-launcher.jar
rm ant.jar ant-launcher.jar
jar cfm ant.jar META-INF/MANIFEST.MF META-INF/LICENSE.txt images/ org/
rm -rf META-INF/ images/ org/
java -jar ant.jar -version

I get:
Apache Ant version 1.6alpha compiled on September 9 2003

Which means that Ant is using the ant-launcher classes in the same jar.

If I change line 57 of ${ant.home}/bin/ant.bat from:
set LOCALCLASSPATH=%ANT_HOME%\lib\ant-launcher.jar;%CLASSPATH%
to:
set LOCALCLASSPATH=%ANT_HOME%\lib\ant.jar;%CLASSPATH%

and these lines in ${ant.home}/bin/ant (the shell script)
if [ -z "$LOCALCLASSPATH" ] ; then
   LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
else
   LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
fi

to

if [ -z "$LOCALCLASSPATH" ] ; then
   LOCALCLASSPATH=$ANT_LIB/ant.jar
else
   LOCALCLASSPATH=$ANT_LIB/ant.jar:$LOCALCLASSPATH
fi

then doing:

ant -version

gives me:

Apache Ant version 1.6alpha compiled on September 9 2003

rather than an error.

I spent some time yesterday trying to find the minimum set of jars files required to run Ant, and by doing the above, I only need one jar. I'm sure there must be a good reason to have the ant-launcher classes in a separate jar, but obviously I don't know what it is or I wouldn't be rambling on about it!

Dale


Steve Loughran wrote:

Dale Anson wrote:

It looks like either optional.jar or ant-launcher.jar are required in addition to ant.jar, see below. It might be nice to put the classes from ant-launcher.jar into ant.jar.


not possible, because the role of ant-launcher is to set up the classpath to load ant.jar and the other jars.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to