ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Eaves" <>
Subject Re: Another Neophyte Question
Date Wed, 27 Jun 2001 02:33:23 GMT
Hi Jerry, Diane,

> In your first example, the problem is you need to have your in
> a "test" subdir, since you've declared it to be in package "test", so the
> Java compiler will create a "test" subdir of the directory you've told it
> to put classfiles into (ie., the dir pointed to with -d) and put the
> classfile in that "test" subdirectory. That's why <javac> expects the
> source-tree dir structure to match the package dir structure, because the
> compiler outputs classfiles in subdirs based on the package.

Strictly, that's not true.  The only part of the Java development kit that
requires that structure is the javadoc.

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).

I can send examples of my build.xml and directory structure if anybody
is remotely interested.

    -- jon

[ big snip ]

View raw message