Why is the setContextClassLoader()
method placed on Thread
?
What different thread have different classloaders?
The question is what if I extended a ClassLoader
, loaded there some new classes. to the my custom classloader.
Now , I want it to be the context classloader , so I call the method Thread.currentThread().setContextClassLoader(loader)
.
Are these new classes awailable only in the context of the current thread ? Or how does it work?
Thanks