Deep understanding of Java Virtual Machine virtual machine execution subsystem

Source: Internet
Author: User
Structure of class file

There are two structures in Java's class file: unsigned numbers and tables. The smallest storage unit is 8 bytes.

Unsigned numbers are the basic data types used to describe numbers, UTF-8 encoded strings, and index references.

Represents a complex data structure that consists of multiple unsigned numbers.

which

  • Magic is the magic number, and the magic number takes up 4 bytes, what is the magic number to do? It actually means that the type of the file is a class file, not a JPG image, or an AVI movie. The magic number corresponding to the class file is 0xCAFEBABE.
  • Minor_version represents the minor version number of the class file.
  • Major_version represents the major version number of the class file.
  • CONSTANT_POOL constant pools primarily store literal and symbolic references. Where the literal contains the static string, the static final constant, and so on. A symbol reference contains the fully qualified name of a class or interface, the names and descriptors of fields and methods, and so on.

There are also various descriptive classes of information, such as: the implementation of the interface list, superclass, method list, attribute list and so on.

To some extent, the information stored in the class file is loaded, most of it is stored in the method area.

Deep understanding of Java Virtual Machine virtual machine execution subsystem

Related Article

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.