ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
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 <m.zywno@gmail.com> 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
<http://cvs.apache.org/viewcvs.cgi/ant/src/main/org/apache/tools/ant/loader/AntClassLoader2.java>.

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

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message