ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: classpath in javac and java
Date Tue, 29 Jul 2003 07:00:35 GMT
On Mon, 28 Jul 2003, Rebhi Baraka <> 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

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



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

View raw message