Java virtual machine (6) --- Overview of class loader and class loading process

java virtual machine (6)-class loader and class loading process overview

  1. The class loader subsystem
    Insert picture description here
    is responsible for loading Class files from the file system or the network. The class files have a specific file identifier at the beginning of the file.
    Classloader is only responsible for the loading of class files. As for whether it can run, it is determined by the Excution Engine.
    The loaded class information is stored in a space that becomes the method area. In addition to the class information, the method area also stores runtime constant pool information, which may also include string literals and numbers that are always on. This part of the constant information is in the class file The memory map of the constant pool part.
  2. Classloader role
    Insert picture description here
    (1) The class file exists on the local hard disk, which can be understood as a template drawn on paper by the designer, and finally this template needs to be loaded into the jvm when it is executed, and n is instantiated according to this file. An identical instance
    (2) The class file is loaded into the jvm, which is called a DNA metadata template, and it is placed in the method area.
    (3) In the .class file -> JVM -> finally called a metadata template, this process requires one The means of transportation (class loader), plays the role of a courier.
  3. Class loading process
    Insert picture description here
    Insert picture description here

》》》Bloggers update their learning experience for a long time, recommend likes and follow! ! !
》》》If there is something wrong, please leave a message in the comment area, thank you! ! !

Guess you like

Origin blog.csdn.net/qq_41622739/article/details/105022664