Deepen Shallow JVM (1) ---- Two Environments

zhaozj2021-02-12  195

If you want to truly master Java technology, you first remember its four components: Java language, Class file format, JVM, and Java API.

If you say that you have learned Java, then you already know, Java has two environment: compile the environment and running the environment. Ok, we discuss it separately.

1) Compile the environment

What is the compilation environment? If you installed JDK, then everything in your d: /j2sdk1.4.2 is your Java compile environment.

The workflow of the compilation environment is as follows: You use the Java language specification, or use the Java API, write (or automatically generate) a .java file; then you use the Javaac.exe file in the Java compilation environment, compile it; finally, you Get a "Class File Format" file.

Writing here, you should already understand that the compilation environment does not equipate the development environment, because your .java file may be dynamically generated during runtime (see what I wrote <

>). Please do not call the compilation environment as the development environment.

2) What is the operation of the environment? Your C: / Program Files / Java / J2re1.4.2 is your Java running environment.

The Java running environment is the Java platform.

The Java platform consists of JVM and Java API.

JVM consists of class loaders and JVM running engines.

We look at the four components of Java technology: you learn the norms of Java language and Java API, write the code that meets the specification; compile it with compilation environments, and determine if it meets the specification, if you meet, get the file format ; Then, the JVM class loader loads these files, gives the JVM running engine, and the engine starts consumption.

转载请注明原文地址:https://www.9cbs.com/read-6897.html

New Post(0)