Today, we are going to talk about class loader in the JavaEE environment. We start from the normal ClassLoader hierarchy in JavaSE application, then analyze the differences between JavaEE. ClassLoader Hierarchy In a normal JavaSE application, we have three levels of ClassLoader: Boostrap ClassLoader Extension ClassLoader System ClassLoader Because all classes in Java are loaded by ClassLoader, we have to solve the problem: how is the first class in Java loaded? The answer is simple if we jump out of the scope of a single language. The first class in Java is loaded by a c++ ClassLoader, and because its this functionality, it is called ‘Boostrap’ ClassLoader. Besides the first class, all the classes of Java core library are all loaded by this ClassLoader in the aim of security. Extension ClassLoader, as it name indicates, is used to load installed extensions under lib/ext of jdk home. System ClassLoader, on the other hand, is used to load application specific classe...
Learn programming, still on the way