As mentioned earlier, JDK and JRE can be installed separately, but if you install the JDK, it comes with a JRE, which is located under the JRE folder of the JDK installation folder.
Will we just install the JDK once and for all?
In fact, this is the first two JRE to make a distinction on the name, a separate JRE called the public JRE, and the JDK comes with the JRE is called the private JRE,
In the literal sense, one is public and one is private.
The private JRE that comes with the JDK is primarily used when developing Java programs, and the main difference from the public JRE is that the private JRE has more server VM execution options than the public JRE,
Look at the bin directory of both to see that there is only one client folder in the public JRE, and the server folder is more in the private JRE
Both of these folders store JVM-related documents, but they use different VMs.
The client VM uses less memory for faster boot speeds, while the server VM consumes more memory and has a long start-up time, but better execution performance.
In the JRE directory, there is also a file src.zip, which holds the source code for the Javase API, and these source code-compiled. class files are placed in Rt.jar documents in the Jre/lib folder.
(The jar document is a zip-compressed format that can be opened directly using the Unzip software.) )
This blog post refers to the Java Learning Note (Lin Shinliang)
Understanding the installation content of the JDK