After go through google i indeed could not find an example for how to use Thread.getContextClassLoader(),
maybe this question is duplicate as below Difference between thread's context class loader and normal classloader
My question is recap below: As i know a scenario for using Thread.getContextLoader, Becasue JNDI core classes included in /lib/rt.jar but those JNDI Core (maybe they are only some interface) have not bean implemented, in other works if you want to use JNDI's functions you must provide a JNDI's implementation, an then we place those implementation (maybe are jars) into system classpath, but now the core JDNI classes are loaded by Bootstrap and those core classes have to use its implementation classes, Ok we supply an Thread.getContextClassLoader() (if you no have any operations default is ClassLoader.getSystemClassLoader()) for him, it can load those now, i just supposed that why the core JNDI classes using this manner to get the systemClassLoader 'ClassLoader.getSystemClassLoader()' directly?
Maybe some points i explained not correct..
<1> but i just wanna to understand if we can use ClassLoader.getSystemClassLoader() instand of Thread.getClassLoader() to loader System classpath classes or resouces in the classes which loaded by bootstrap classloader?