I. Class Loader
1. Root loader, written by bootstrap,c++;
2. Extension class loader, Java writing;
3. System, Application class loader, Java writing;
4. User-defined class loader, Java.lang.ClassLoader subclass, user can customize the loading mode of the class;
Two. How classes are loaded
1. Directly loaded in the locally compiled class
2. Network load: Java.net.URLClassLoader can load the class specified by the URL
3. Load class from jar, zip and so on, automatically parse jar file to find class file to load Util class
4. Dynamically compile from Java source code file into class file
Parental delegation Model
When a class receives a load request from the ClassLoader, it first delegates the load task to the parent ClassLoader, recursively, if the parent ClassLoader is able to complete the load task, returns successfully if the parent ClassLoader cannot load and takes the load itself.
Java class loading process