ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Wannheden <>
Subject Re: javac task compiles missing files automatically
Date Mon, 16 Jul 2001 16:48:37 GMT
Steffen Euch <> writes:

> Hi!
> Bernie Bernstein wrote:
> > At 02:54 PM 7/16/2001 +0200, Steffen Euch wrote:
> >
> >> I don't want Ant to search missing source files automatically.
> > Ant isn't the program that is finding those files, it's javac (or
> > Jikes) that is finding them.
> What I wanted to say is: I don't want Ant to invoke javac to that it
> searches missing source files automatically.
> > Java compilers look in the classpath for files to compile that the
> > given files may be dependent upon. You should take any files that
> > should not be found by the compiler out of the classpath.
> I've tried
> <javac ... classpath="">
> <javac ... classpath=".">
> <javac ... classpath="_">
> But the verbose output is always:
> [javac] Compilation args: -d D:\test\classes -classpath
> D:\test\classes -sourcepath U:\foo\java\src -g -verbose
> I don't know why "D:\test\classes" is used. It should only be the
> destination directory for the class files.


So where does it get the sources from now, your sourcepath or the
destination directory?  javac searches the sourcepath and classpath
for sources, but I don't understand why you would have the sources in
the destination directory.

The problem isn't the way Ant invokes javac.  The problem is how you
have configured your sourcepath and classpath.  The documentation to
javac documents quite precisely how javac locates sources
I suggest you take a look at that documentation and remove the
external sources from the sourcepath and classpath so that javac won't
find them.


View raw message