ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Peshansky <>
Subject Re: $LOCALCLASSPATH equivalent for windows?
Date Wed, 11 Jan 2006 16:39:47 GMT
Jeffrey E Care/Raleigh/IBM@ibmus wrote on 01/11/2006 11:24:12 AM:

> Is there an equivalent to $LOCALCLASSPATH for the Windows launch script 
> Ant 1.6.5?
> I have two classes (for a JSR-47/Ant logging bridge) that unfortunately 
> *MUST* be on the system classpath (because java.util.logging is 
> The launch script for UNIX (i.e. bin/ant) checks for the presence of the 

> LOCALCLASSPATH variable; if found the contents are appended onto the 
> system classpath variable as passed to Java. I can't find an equivalent 
> environment property for the Windows launch script (i.e. bin\ant.bat). I 

> can always modify the ant.bat, but if there is a cleaner way to insert 
> entries into the system classpath I would like to use it. Am I missing 
> something obvious?
> Sorry if this is a dupe, but neither Google nor marc.aimsgroup yielded 
> relevant information.
> TIA,

AFAICS, there is no equivalent of LOCALCLASSPATH in ant.bat.  If ANT_OPTS
were to follow the -classpath argument instead of preceding it, you'd be
able to use it to override the classpath setting.  As is, looks like you'd
have to modify the batch file (though it's relatively easy to accomodate

A question for the developers: would it make sense to move ANT_OPTS after
the -classpath argument (in both the batch file and the shell script)? One
obvious caveat is that it would be possible to produce a classpath that
doesn't contain the launcher JAR.  It might be better to just go with 
LOCALCLASSPATH support to ant.bat instead.
Igor Peshansky  (note the spelling change!)
IBM T.J. Watson Research Center
XJ: No More Pain for XML?s Gain (

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

View raw message