ClassLoader class Loader
Common class loaders have bootstrapclassloader<-extclassloader<-appclassloader<-users ClassLoader
Bootstrapclassloader: Loading Java's own core class;
Extclassloader loads the jar package in the/jre/lib/ext directory, and the same user can place the jar in that directory.
Appclassloader load Classpath the contents below,
Loading process:
Reads the file and loads, first requests the parent class loader to carry on the load, if the parent class loader cannot load, then the subclass to load, finally cannot find the class, then will throw the classnotfoundexception;
Step two, link. The byte code that has been loaded is parsed and verified to see if it conforms to certain specifications, otherwise it throws classnotfounderror. Then implement the allocation of memory.
Step three, initialize. Calls the constructor, initializes the static variable, and the passive block.
It is important to note that during class loading, multiple threads are blocked.
In fact, ClassLoader itself is a Java class, and these classes are implemented by the JVM kernel to implement loading.
JVM--byte code loading