Detailed introduction to the basic process of Java class loading
Detailed introduction to the basic process of Java class loading
Basic process:
The array class itself is not created by the class loader, but directly created by the Java virtual machine. The element types of the array class are loaded by the class loader. Element type of array class: the type of array after removing all dimensions,
File format validation:
Metadata validation: semantic analysis of bytecode description information:
Bytecode verification: determine the legitimacy and correctness of the program through semantic flow and control flow analysis, and verify the method body analysis.
Preparation: allocate memory for class variables and set the initial value of class variables in the method area.
Resolution: the virtual machine replaces the symbolic reference in the constant pool with a direct reference procedure
CONSTANT_ Class_ info,CONSTANT_ Fieldref_ info,CONSTANT_ Methodref_ info..
Initialization: starts executing the Java program code in the class definition. Execute the class constructor < cinit > () method,
():
Thank you for reading, hope to help you, thank you for your support to this site!