ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Passed in $CLASSPATH versus javac classpath
Date Thu, 03 May 2001 07:40:19 GMT

We also use a wrapper to call ant, however the calls in our wrappers are in
the form
'ant -buildfile <buildfile> -logfile <logfile>'

Which on NT invokes ant.bat and on Solaris invokes the ant shell script.
The problem we encountered was that ant.bat and ant (shell) construct
LOCALCLASSAPATH in different ways.  Because of the problems this caused we
decided to build an application specific classpath (appcp) in the wrapper
and assign it to the classpath property in the javac task.  

	<target name="build" depends="init">
		<echo message="information: building ${src} into
		<javac srcdir="${src}" 

The wrapper also sets CLASSPATH to include only the jars from

This appears to work OK.


-----Original Message-----
From: []
Sent: 02 May 2001 23:31
Subject: Passed in $CLASSPATH versus javac classpath

I'm invoking ant with a wrapper script, which calls ant using


It appears that whenever ant encounters a <javac> task, it uses the passed
$LOCALCLASSPATH instead of any path specified using the "classpath"
attribute of
the <javac> task.  Is this expected behavior?  Is there anything that can be
done (other than refraining from using the '-classpath' option in the
to make ant use the classpath specified in the <javac> task rather than the
passed via the '-classpath' option?



Part of the Halifax Group, Halifax plc, Registered in England No. 2367076.  Registered Office:
Trinity Road, Halifax, West Yorkshire HX1 2RG. Represents only the Halifax Financial Services
Marketing Group for the purposes of advising on and selling life assurance, pensions and unit
trust business.  The Marketing Group is regulated by the Personal Investment Authority.  Switchboard
01422 333333.


View raw message