geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@coredevelopers.net>
Subject Re: [ClassLoader] What is the TCCL for Twiddle?
Date Wed, 01 Oct 2003 04:43:09 GMT
> It means that to load a class dynamically, the first attempt should be:
> Class clazz = 
> Thread.currentThread().getContextClassLoader().loadClass(aClassName);
> If it fails, one should try the standard classloader via the standard 
> call:
> Class clazz = Class.forName(aClassName)
>
> BTW, it should be great to implement such an helper class.

o.a.g.c.Classes.loadClass() already does this, though not sure if it is 
still there with the recent move of stuff...

--jason


Mime
View raw message