ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: javac compilation
Date Fri, 21 Nov 2003 15:33:07 GMT
On Friday 21 November 2003 15:17, Doug Lochart wrote:
> Yes it can but the directory for your compiled classes must match the
> package structure of your source and the root directory of the classes
> structure needs to be in the classpath of the build or else it will
> recompile all the java files all the time.

This is not quite true.
The directory layout of your souces must match the
package declarcations in the sources. So for example
if you have a file in package org.acme and the source dir
is src, then has to be in the directory src/org/acme.

If one then whats the classes to be in a directory called classes
can then do:
<javac srcdir="src" destdir="classes"/>

The javac task will check if src/org/acme/ is newer that
classes/org/acme/A.class and if so it will call the javac compiler
with src/org/acme/ and the target classes dir as "classes".


> Doug
> Now I've gained some understanding
> Of the only world that we see.
> Things that I once dreamed of
> Have become reality.
> These walls that still surround me
> Still contain the same old me,
> Just one more who's searching for
> A world that ought to be.
> ----- Original Message -----
> From: "Parimala" <>
> To: "'Ant Users List'" <>
> Sent: Thursday, November 20, 2003 11:46 PM
> Subject: javac compilation
> > Hi folks,
> >     I have a doubt, Does javac compiles only modified .java files???
> >
> > Parimala
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message