java - Difference between thread's context class loader and normal classloader -


what difference between thread's context class loader , normal classloader?

that is, if thread.currentthread().getcontextclassloader() , getclass().getclassloader() return different class loader objects, 1 used?

each class use own classloader load other classes. if classa.class references classb.class classb needs on classpath of classloader of classa, or parents.

the thread context classloader current classloader current thread. object can created class in classloaderc , passed thread owned classloaderd. in case object needs use thread.currentthread().getcontextclassloader() directly if wants load resources not available on own classloader.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -