ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weiqi Gao <weiqi...@networkusa.net>
Subject Re: Couple of mods to <javac>
Date Wed, 13 Sep 2000 12:04:10 GMT
Diane Holt wrote:
> 
> Hi Conor,
> 
> Sorry this turned into a bigger thing than I'd thought it would. All I can
> say is that these particular files don't depend on any others, other than
> the "library" classes (if that's the right term for Java) from the
> classpath -- and no others depend on them. They're just these little
> entities unto themselves. They live where they do in the source tree
> because, like any source-tree structure, the subdir they live in says
> something about what they are. And also because there are other
> (non-compiler) utilities that garner information about them, based on
> that.

Please check out the JLS for how unnamed packages is handled in a
hierarchical file system:
http://java.sun.com/docs/books/jls/html/7.doc.html#26639

> The java compiler doesn't require these source files live any particular
> place,

"In Java systems that use a hierarchical file system for storing
packages, one typical strategy is to associate an unnamed package with
each directory; only one unnamed package is available at a time, namely
the one that is associated with the "current working directory." The
precise meaning of "current working directory" depends on the host
system."

For the Sun JDK, and all of the other Java development tools that I know
of, classes in the unnamed package should reside in the "current
directory" or the directories in the CLASSPATH (which extends the JVM's
idea of the current directory), but not subdirectories of these
directories.

So the claim that classes belonging to the unnamed package can be put
anywhere in the file system is erroneous, at least when the currently
available JDKs are concerned.

> and where they live does serve a purpose, so they are where they
> are -- and if I'm going to be able to use Ant as a build tool, then I need
> <javac> to be able to handle that (I can't have files re-compiling every
> time thru for no reason). I wouldn't want to have to recreate ant.jar
> everytime I pick up a new release or latest nightly, but if my change
> isn't valid enough to go in, then I guess I'll have to live with that.
> (Actually, come to think of it, I'll need to anyway, if my suggestion to
> get rid of the extra line of space between the target-names in the logging
> output doesn't get picked up either, and since I never heard anything back
> from anyone about that one, I'm guessing it won't be. So, oh well...)

-- 
Weiqi Gao
weiqigao@networkusa.net

Mime
View raw message