Prior knowledge is required

What is the relationship between the JVM and the operating system?

JVM, JRE, JDK?

So we know what the JVM is, and the JVM is basically our operating system, which is responsible for interpreting or translating.class files, recognizing instructions in.class, and calling instructions in the operating system.

We learned that the JVM is at the heart of what makes Java programs run and can run across platforms. But the JVM can’t do all of this on its own, just like “why do you need product managers, why do you need testers, why do you need operations people”.

We’re like developers, but what about before and after you develop? What do you not know how to develop? How do you ensure normal use after project development?

The JVM is powerful, but it still needs other friends to feed it (.class files).

The JVM alone cannot compile once and run everywhere. It requires a basic class library, which is the FAMILIAR API, such as how to manipulate files, how to connect to the network, and so on.

In the Java architecture, the JVM also runs and destroys together as a program executes, passing it all the libraries it needs to run at once. The JVM standard, along with a bunch of base libraries implemented, makes up the Java Runtime Environment, also known as the JRE (Java Runtime Environment).

With the JRE, our Java programs can run on any operating system.

3. To expand knowledge:

You’ve probably heard that if you’re just running the environment, you just need to install the JRE.

Yes, if you only need to run some Java programs, you only need a JRE.

For the JDK, individuals are very large. In addition to carrying the JRE, the JDK also provides some very useful gadgets, such as Java, Javac, JAR, etc. It’s at the heart of Java development, like feeding your kitchen ingredients so you can copy out delicious dishes.

3. To expand knowledge:

If you are in a development environment, you will need to install the JDK.

Java Development Kit (JDK) The relationship between the JVM, JRE, and JDK can be represented by an included relationship.

The three include relations:

JDK>JRE>JVM