Javatpoint Logo
Javatpoint Logo

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

Test it Now

Output:

Context ClassLoader = [email protected]
Parent = [email protected]
Class = class jdk.internal.loader.ClassLoaders$AppClassLoader
Thread is running






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA