Andrew John Hughes gnu_andrew at
Tue Nov 3 13:55:01 PST 2009

2009/11/3 Jonathan Gibbons <Jonathan.Gibbons at>:
> Currently, javac does not generate package-info.class when
> contains no annotations.
> This can cause issues for build systems that assume that for every *.java
> file, the compiler ought to generate a corresponding *.class file.
> It appears that Ant 1.8 has apparently taken it upon itself to "work around"
> this issue, by generating package-info.class if javac does not. Does anyone
> have any opinions as to whether this is a good or bad idea? Is this
> something that should really be fixed in javac, perhaps as an optional
> behavior?
> -- Jon

What would such a class contain? Presumably it would be just an empty
shell, with just a single no-argument constructor?

The (and are a bit of a hack as
pseudo-Java classes to begin with, so it doesn't surprise me all that
much that another hack is needed to make them indistinguishable from
normal classes.
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (

Support Free Java!
Contribute to GNU Classpath and the OpenJDK

PGP Key: 94EFD9D8 (
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

More information about the compiler-dev mailing list