Java Virtual Runtime data area

Source: Internet
Author: User

PS: Time Flash long, distance from the previous article in the past, for two reasons, one, the company's project is nearing the end of the user's demand function needs to be solved immediately, and second, from the day to speed up the improvement and modification of demand function, after work almost do not want to continue, lazy mood has.

Talk about the end of the topic, began to continue to study notes the collation of the article, a small step a day, over time is a huge step. Today's topic is the runtime data area of the Java Virtual machine.

The Java Virtual machine (JVM) is a software program provided by the JDK, and its task is to execute the Java program, the following gives the virtual machine execution Java process diagram.

  You can see that the Java source files compiled by the class file can be run on any platform, so Java has a "compile, run everywhere" commonly known, but also reflects its cross-platform this powerful feature, attributed to Jiede is a powerful Java virtual machine, Java Virtual machine encapsulates the underlying operating system differences, Results in the following steps to run the program, regardless of the platform.

First, the binary data in the. class file is loaded into memory, followed by the validation of the binary data of the class, and finally, the instructions are parsed and executed.

The Java Virtual Machine provides the environment in which the program runs, and one of the most important resources in that environment is the runtime data area. The runtime data area is the memory area that the operating system allocates for the Java Virtual machine, and the Java Virtual Machine governs the area, which further divides the area into sub-regions, including the heap area, the method area, and the Java stack area ... The object is stored in the stack area, the type information of the class is stored in the method area, the type information includes static variables and method information, and so on, and the method information contains the bytecode of all the methods of the class.

When running the Java compilation command, a Java Virtual machine is started, which first finds the Java file to be compiled from Classpath, reads the binary data from the file, and stores the type information of the Java file class in the Runtime data area method area. This process is called the Java class file loading process.

After the Java virtual machine has loaded the Java class file to be compiled, the class file is also inspected and initialized, the details about the initialization are described in the later chapters, and the Java virtual machine then navigates to the bytecode of the Main method main () method of the compiled class file in the method area to execute its instructions.

At this point, the Java to prepare a small theoretical knowledge of the theory has been introduced, the follow-up will formally step into the study of Java, grammar, norms, Javaapi in the introduction of various types and so on ...

Java Virtual Runtime data area

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.