Why 2 bins for exe in jdk?
When I install JDK (TM) Update 10, it installs the following four features:
-> Development Tools
-> Demo and samples
-> Source code
-> Java DB
With the last three features, I have no probz at all.
Currently development tools contain: -
- java devlopment kit (for developing java applications, here jdk1.6.0_10)
- public jre (which is always necessary if u wants to run java applications regardless of jdk , here jre6)
jdk (jdk1.6.0_10) contains: jre, bin, etc..etc ...
The jre directory also has a bin directory .
On my windows machine, I have set the path value: -
path = C: \ Program Files \ Java \ jdk1.6.0_10 \ bin ;.
This means I am using javac.exe jdk1.6.0_10 \ bin to compile .java files and
java.exe is also from jdk1.6.0_10 \ bin , not jdk1.6.0_10 \ jre \ bin to interpret .class files.
javaw.exe is also from jdk1.6.0_10 \ bin , not jdk1.6.0_10 \ jre \ bin to interpret .class files.
Also, jdk1.6.0_10 \ bin also has appletviewer.exe , jar.exe , jarsigner.exe , java -rmi.exe , javadoc.exe , javap.exe , rmic.exe , rmiregistry.exe strong> which I often I use some more exe .
Also both jdk1.6.0_10 \ bin, jdk1.6.0_10 \ jre \ bin have some common as well as different exe.
If a developer the developer wants to develop and test Java applications, jdk1.6.0_10 \ bin is more than sufficient (since it contains all the above exe mentioned in BOLD ) and if the user wants to use Java applications then public jre is more than enough (which comes with the JDK, if u is not a developer or the JDK is not installed, u can also download it separately).
Now the point I am not getting is that
-> when all exe for runtime ( java.exe , javaw.exe ) or required for binding ( rmiregistry.exe ) (mentioned above in BOLD + ITALIC ) are present in jdk1.6.0_10 \ bin ,
What confuses me
Why does jdk provide jre inside jdk1.6.0_10 directory ???
source to share
It's hard to figure out what you are really asking, but the java.exe inside jdk \ bin and jdk \ jre \ bin are identical:
C:\Program Files\Java\jdk1.6.0_13>md5sum bin\java.exe
\ee21961559a99f6ab3967e709563cc03 *bin\\java.exe
C:\Program Files\Java\jdk1.6.0_13>md5sum jre\bin\java.exe
\ee21961559a99f6ab3967e709563cc03 *jre\\bin\\java.exe
I think you are really asking, "If you are installing the JDK, then what is the point in also installing the JREs it contains?" I think you will have to ask Sun to actually get the right answer, but my guess is that it will be for those looking to run / test their applications (which they develop) in a JRE rather than a full blown JDK.
source to share
There are several identical files, but the main reason for having the JRE inside the JDK is the directory jre\lib\
that contains most of the things you need to run Java, mainly the DLLs and rt.jar that contain the main class files.
To reduce the size of the installed file, the JDK commands will look like in jre\lib\
.
The Sun guys have duplicated a few files in bin\
to make your life easier: often it's enough to just have a JDK directory bin
in your PATH, not both.
PS: The installer has also placed a copy java.exe
in the directory Windows\system32\
.
source to share
JRE is the Java Runtime Environment as well as a Java program that redirects applications that require the use of java. When you request a web page that needs Java, there must be a program that listens for such requests and uses Java appropriately to generate the correct response. Java is not just a development kit: it is a programming language. What you download from the website is the developer kit + runtime.
source to share
The answer to the question can be found here:
http://www.oracle.com/technetwork/java/javase/documentation/install-windows-142126.html#private
The private JRE at jdk1.6.0_10 \ jre \ bin is used by the applications that come with the JDK. He should be left alone.
source to share