ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: why MyClass.class.getPackage returns null when ant classloader is used?
Date Thu, 10 Mar 2005 10:16:13 GMT
On Thu, 10 Mar 2005, Maciej Zywno <> wrote:

> Thanks, but could you say more about it?

This is from Ant't WHATSNEW file:

| * ClassLoader creation changes to use a factory method in Project. A new
|   class AntClassLoader2 implemented for 1.2+ specific features including
|   Package information and addition of classes specified in the Class-Path
|   element of a Jar's manifest.

in the fixed bugs category.  You need to look at

> I checked that ant classloader does not override getPackage method,
> so the same method(i.e. ClassLoader.getPackage) is used when using
> both ant and sun classloaders.

Yes, but I guess the ClassLoader.getPackage doesn't return anything
useful unless defineClass invokes definePackage - which the
classloader in Ant 1.5.4 doesn't.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message