ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Cepek" <>
Subject ant overloading javac classpath?
Date Fri, 24 May 2002 17:58:43 GMT
When I use -verbose to see what classpath ant is using for javac, I get
the following (reformatted for readability):

 [javac] Compilation args: javac
   -d C:\mike\cvs\netbeans\smsi\src\java\classes
   -classpath C:\mike\cvs\netbeans\smsi\src\java\classes
   -sourcepath [...]

The first one (...\java\classes) comes from my javac/destdir setting.

The next two (...\lib\xerces*) are from my javac/classpath[ref] setting.

The remaining ones apparently come from the script that starts ant up,
which appends some jars onto any system environment CLASSPATH settings
(unless they don't exist on the filesystem).

And upon further experimentation I have learned to turn it off with

However, it leads me to this question:

   Why does ant include all these extra JARs just because
   I want to use the CLASSPATH from my environment?

This isn't a major problem, of course.  One drawback I see is that the
classpath for my javac becomes longer than necessary (confusing, and a
problem under any O/S with a command line length limit).

Another drawback would be the potential for conflicting JARs (e.g.
jaxp.jar -- what if I'm using a different version of the javax.xml

I'm just curious about the rationale behind Ant appending its JARs (and
tools.jar!) to my CLASSPATH.

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

View raw message