ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciej Zywno <m.zy...@gmail.com>
Subject why MyClass.class.getPackage returns null when ant classloader is used?
Date Thu, 10 Mar 2005 09:22:20 GMT
Hi all,

I've come across strange error in my app. The error is connected
probably with ant classloader and appears while the following piece of
code in my application is run from junit (triggered by ant triggered
by maven):

 MyClass.class.getPackage 

returns null, although the name of the class is sth like
'com.foo.bar.MyClass'. When junit is run from eclipse a package is
found i.e. it is not null. However when run from eclipse, Sun
classloader is used.

I heard that the problem may be with non-delegating ant class loader,
but could not fix it so far. Could you help?

Regards,
Maciek

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


Mime
View raw message