Why does every JDK come with 3 JREs?

I noticed that in the C:\Program Files\Java folder there is a public JRE installed by the JDK, I know that this is normal. But then it contains the jdk1.x\jre\bin\ with java.exe, javaw , etc. And here there is the jdk1.x\bin compiler jdk1.x\bin , which contains javac along with all other files included in the JRE, for example java.exe, javaw, appletviewer , etc.

Why does the JDK come with all of these JREs? What is the difference between these 3?

+7
source share
2 answers

Sun / Oracle documents the JDK directory organization here:

C: \ jdk1.6.0 \ JRE \ Bin: Executables and DLLs for tools and libraries used by the Java platform. The executable files are identical to the files in / jdk 1.6.0 / bin.

...

Note that the file structure of the JRE is identical to the file structure of the JDK directory jre.

Basically, the JRE directory contains files that you can distribute with your application if you choose

+3
source

I do not have any internal knowledge, however I have found that this is useful sometimes.

Typically, the JDK is not installed on people's workstations, but only the JRE. I like to run my applications under the JRE, which, as I know, will be the same as for the clients.

+2
source

All Articles