At 04:34  21/1/01 -0800, Craig R. McClanahan wrote:
>The precise answer to what works depends on how your particular class
loader is
>implemented.  My experience (although this classloading stuff is "black
magic" at
>times) is that URLClassLoader, which is what Tomcat 4.0 uses, follows the
process
>described in the javadocs for java.lang.ClassLoader.loadClass():

Right - I wasn't talking about how the ClassLoader works but how
Class.forName() works. From experience I asuume that 

Class.forName( "Foo" );

is equivelent to 

Class.forName( "Foo", true, Thread.currentThread().getContextClassLoader() );

which seems to make more sens. If
Thread.currentThread().getContextClassLoader() is null then it gets it's
parent threads ContextClassLoader. If it reaches first thread then it uses
system classloader.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to