86
Java Thread getContextClassLoader() method
The getContextClassLoader() method of thread class returns the context ClassLoader for the thread.
Syntax
Return
It returns the context ClassLoader for the Thread.
Exception
SecurityException: If the current thread cannot get the context ClassLoader.
Example
Output:
Context ClassLoader = [email protected] Parent = [email protected] Class = class jdk.internal.loader.ClassLoaders$AppClassLoader Thread is running
Next TopicMultithreading Java