ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: class.forName()
Date Fri, 16 Nov 2001 14:39:41 GMT
On Sat, 17 Nov 2001 01:16, Michael Remme wrote:
> in ant 1.4 i have the problem, that the Class.forName() is throwing an
> exception. I saw in the archive, that there was a similar request, but did
> not find any reply.
> Here the problem is residing in an own taskdef, where i want to instantiate
> a class by calling Class.forName( xxxx ), which is always throwing a
> ClassNotFoundException. If i am instantiating the needed class directly, it
> is found.

The class you are looking up should be in the same classloader or a parent 
classloader of your task. So if your task is loaded from ant/lib then the 
other class must also be in ant/lib etc.

Does that help any? 

If not you will need to give more details.



I think not; therefore I ain't...

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

View raw message