Student question: Isn't the JVM a virtual machine that runs Java programs? What is the relationship between the JRE and the JVM?
A: Simply put, the JRE contains the JVM. The JVM is the core virtual machine that runs Java programs, and running Java programs requires not only the core virtual machines, but also other classloader, bytecode validators, and a large number of base class libraries. In addition to the JVM, the JRE contains additional environment support for running Java programs.
Student question: Why not install a public JRE?
A: The public JRE is a standalone JRE system that is installed separately under the other paths of the system. The public JRE registers the Java Runtime environment with the Internet Explorer browser and the system. In this way, the public JRE can be used by any application in the system. There is not much need to install a public JRE because there are fewer opportunities to execute applets on a Web page, and it is entirely possible to run Java programs using the JRE in the JDK directory.
Crazy Java Handouts (1)--Java language overview