Steps for the Java Virtual machine load class

Source: Internet
Author: User

Class Mount steps:
In Java, the class loader to load a class into a Java virtual machine, to go through three steps to complete: loading, linking and initialization, wherein the link can be divided into the verification, preparation and parsing three steps, in addition to parsing, the other steps are strictly in order to complete, the main work of each step is as follows:

Loading: Finding and importing binary data for classes or interfaces;


Link: Perform the following validation, preparation and resolution steps, where the parsing step is optional;


Checksum: Check the correctness of binary data of imported class or interface;


Prepare: Allocate and initialize storage space for static variables of class;


Parsing: The symbolic reference is converted to a direct reference;


Initialize: Initializes the Java code and static Java code blocks of the static variables of the class.


Initializing a property in a class is a common use of static code blocks, but only once.

Steps for the Java Virtual machine load class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.