Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 89097 invoked from network); 30 Sep 2000 21:16:54 -0000 Received: from kleopatra.acc.umu.se (root@130.239.18.150) by locus.apache.org with SMTP; 30 Sep 2000 21:16:54 -0000 Received: from mao.acc.umu.se (root@mao.acc.umu.se [130.239.18.154]) by kleopatra.acc.umu.se (8.11.0/8.11.0) with ESMTP id e8ULGpi07260; Sat, 30 Sep 2000 23:16:52 +0200 Received: (from markush@localhost) by mao.acc.umu.se (8.9.3/8.9.3/Debian 8.9.3-21) id PAA00800; Fri, 29 Sep 2000 15:00:27 +0200 Date: Fri, 29 Sep 2000 15:00:26 +0200 From: Markus Holmberg To: Diane Holt Cc: ant-user@jakarta.apache.org Subject: Re: destdir included in classpath, why? Message-ID: <20000929150026.A30263@acc.umu.se> References: <20000925190412.11158.qmail@web116.yahoomail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3-current-20000511i In-Reply-To: <20000925190412.11158.qmail@web116.yahoomail.com>; from holtdl@yahoo.com on Mon, Sep 25, 2000 at 12:04:12PM -0700 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N I now realized that the destination directory has to be included in the classpath when using Ant because Ant might just include a subset of the source files on the command line (as opposed to all when compiling without ant). Therefore it needs the not included classes from the destination directory. I didn't get that until now.. :) The reason I asked why the destination directory was included in the first place was that I had problems with the compiler not picking up up changes I had made (old classes from the destination dir were taking precedence I believe), which forced me to clean out the dest dir and do a fresh recompile. But my memory might not serve me correct, it could have been some other reason. It doesn't happen often though, so it's ok. Regards, Markus. On Mon, Sep 25, 2000 at 12:04:12PM -0700, Diane Holt wrote: > --- Markus Holmberg wrote: > > Using a recent ant version from CVS, I noticed that the value of the > > destdir attribute of the javac task is included in the classpath (as the > > first path). > > > > Is there a reason for it being included at all? (Without the user > > specifying it). > > Because, as your java files are getting compiled, you want the compiler to > find the ones it's already done so it can resolve the references in the > currently-being-compiled file. Same reason the srcdir is included -- if it > can't find the classfile (in the output dir package hierarchy) that > contains the references in the currently-being-compiled file, it will look > for a source-file and (if it finds one) compile it, then use that > just-compiled classfile (which it has put into the output dir package > hierarchy) to get back to resolving the references in the > currently-being-compiled file. > > Assuming I (now) understand how java compilers works, that is -- > otherwise, this is completely wrong. :) (And in which case, someone > please correct me.) > > Diane > > > > ===== > (holtdl@yahoo.com) > > > > __________________________________________________ > Do You Yahoo!? > Send instant messages & get email alerts with Yahoo! Messenger. > http://im.yahoo.com/ -- Markus Holmberg | Give me Unix or give me a typewriter. markush@acc.umu.se | http://www.freebsd.org/