Reputation: 3181
I've noticed that within the C:\Program Files\Java
folder, there's the public JRE which the JDK installed, I know this is normal. But then there's the folder jdk1.x\jre\bin\
with java.exe, javaw
etc in it. And then there's the compiler folder jdk1.x\bin
which contains javac
along with all the other files included in the JRE like java.exe, javaw, appletviewer
etc.
Why does JDK come with all these JREs? What's the difference between these 3?
Upvotes: 7
Views: 204
Reputation: 121649
Sun/Oracle documents the JDK directory organization here:
c:\jdk1.6.0\jre\bin: Executable files and DLLs for tools and libraries used by the Java platform. The executable files are identical to files in /jdk1.6.0/bin.
...
Note that the file structure of the JRE is identical to that of the JDK's jre directory.
Basically, the JRE directory contains the files you can redistribute with your application, should you choose to
Upvotes: 3
Reputation: 786
I don't have any inside knowledge, however I have found this to be useful on occasion.
Generally the JDK is not installed on peoples workstations, only the JRE. I like to run my applications under the JRE that I know will be the same as that installed to clients.
Upvotes: 2