What is the relation between the "new" operator and the "ClassLoader" class?
The new operator uses a classLoader to load the class?
I want that when I call: new MyClass() my classLoader execute and load
the class?
I can extend ClassLoader with my own ClassLoader.
The question is when the class loader is invoked .. ?
1) new MiClass()
2) Class.forName("MiClass").newInstance()
3 )ClassLoader myClassLoader = new MyClassLoader()
myClassLoader.loadClass ( "MyClass" ).newInstance()
We can set the classLoader to the current thread :
Thread.currentThread().setContextClassLoader( myClassLoader );
But when this classloader is executed ?