The
Thread class provides the concept of a "context class loader". This is a ClassLoader associated with that Thread. Any thread started by that Thread will inherit the same context class loader. The initial main thread has the system class loader as its context class loader, but this can be changed via setContextClassLoader().
The context class loader will only be used to load classes if you specifically request it. By default, when JVM encounters a class that hasn't yet been loaded, it loads it with the ClassLoader that loaded the class that's currently running in that thread. To use the context class loader, you have to call loadClass() on the ClassLoader object returned by getContextClassLoader().
Any help?