Jon,

> From: Jon Eaves [mailto:[EMAIL PROTECTED]]
>
> Strictly, that's not true.  The only part of the Java development kit that
> requires that structure is the javadoc.

you may want to read the section "SEARCHING FOR TYPES" in
http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javac.html

When javac does such searching, it will only work if the source files are
laid out in directories according to their packages.

Also, such organisation is strongly suggested in the language spec
http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#375
46


>
> I have a number of directories called;
>
> org.eaves.flibble.utils (for example)
>
> With the appropriate package name in the files in that directory.
> And it's all being compiled very successfully by Ant, into the
> right class hierarchy.  javac ignores the directories, and only
> cares about the package names for creating the class directories
> (by observation).

Yes it will work but you lose the automatic searching for types by javac
described above. Note that if you are using Ant, it will pass all of your
files to the compiler, all of the time, which is why the compiler does not
go into it search mode.

Cheers
Conor



Reply via email to