java Classloader

http://www.cnblogs.com/zhanjindong/p/3952445.html

A Java program is made up of a number of custom classes (written by programmers like us) and core
classes (which come pre-packaged with Java). When a program is executed, JVM needs to load the
content of all the needed class. JVM uses a ClassLoader to find the classes.
Three Class Loaders are shown in the picture
• System Class Loader - Loads all classes from CLASSPATH
• Extension Class Loader - Loads all classes from extension directory
• Bootstrap Class Loader - Loads all the Java core files

When JVM needs to find a class, it starts with System Class Loader. If it is not found, it checks with
Extension Class Loader. If it not found, it goes to the Bootstrap Class Loader. If a class is still not found, a
ClassNotFoundException is thrown.

 

原文地址:https://www.cnblogs.com/kakaisgood/p/6599676.html