I am creating a new classLoader using URLClassLoader and trying to set it as the classLoader for the current thread. But it is not working properly for me. As per my understanding, if I set a classLoader to the current thread, the methods and interfaces referenced by the Current Thread should be from the present classLoader. But it is not the case with me. The method is picked up from another jar and I am getting classCastExecption. Following is the code for getting classLoader:I am creating a new classLoader using URLClassL