ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SimonRichards...@halifax.co.uk
Subject RE: Passed in $CLASSPATH versus javac classpath
Date Thu, 03 May 2001 09:19:27 GMT
Stefan

So I understand from what you've said that it's the CLASSPATH environment
variable which is accessible through the javac task and NOT the
LOCALCLASSPATH (set in ant.bat and ant (sh)), even though ant is executed in
these scripts as follows:

java -classpath ${LOCALCLASSPATH} ..... org.apache.tools.ant.Main ......

I hope you don't think I'm dragging this one out a little too much :-).

Simon

> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> Sent: 03 May 2001 10:07
> To: ant-user@jakarta.apache.org
> Subject: Re: Passed in $CLASSPATH versus javac classpath
> 
> 
> <SimonRichardson2@halifax.co.uk> wrote:
> 
> >> > It appears that whenever ant encounters a <javac> task, it uses
> >> > the passed in $LOCALCLASSPATH instead of any path specified using
> >> > the "classpath" attribute of the <javac> task.
> >> 
> >> No, it prepends the passed in CLASSPATH by default (changeable via
> >> build.sysclasspath).
> > 
> > What does it prepend the passed in CLASSPATH with?
> 
> OK, after rereading the source:
> 
> (1) If you set the includeantruntime attribute of javac to false, it
> won't use the CLASSPATH environment variable at all.
> 
> (2) If you set includeantruntime to true (the default), any classpath
> you've specified via the classpath attribute/nested element or
> classpathref attribute will come before the CLASSPATH environment.
> 
> To make things more complicated, there is a magic build.sysclasspath
> property that affects the case (2), see
> <http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta
> -ant/docs/manual/sysclasspath.html?rev=1.1&content-type=text/html>
> for details.
> 
> Stefan
> 
> 

------------------------------------------------------------------------------
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.


==============================================================================


Mime
View raw message