ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: classpath in javac and java
Date Tue, 29 Jul 2003 07:00:35 GMT
On Mon, 28 Jul 2003, Rebhi Baraka <rbaraka@risc.uni-linz.ac.at> wrote:

> In my build file, when I build javac target, I notice that it
> includes all jar files in CLASSPATHs in my .tcshrc script.

Unless you set includeAntRuntime to false.

> But when building a java target it does not include them.  What is
> the reason behind this behavior.

<java> tries to isolate the running process from Ant's environment as
far as possible, while <javac> doesn't do so for historical backwards
compatibility reasons (that's why includeAntRuntime is true by
default).

> In this case, how can I exclude any jars other than the jars I
> specify in the build file?

You have two options.  If you want to apply it only to <javac>, use
the includeAntRuntime (and potentially includeJavaRuntime)
attribute(s).  If you want to apply that policy globally, look at the
build.sysclasspath property[1] - you will want to set it to ignore.

Stefan

Footnotes: 
[1]  http://ant.apache.org/manual/sysclasspath.html


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message