views:

20

answers:

1

If you install the latest java 1.6 jdk, without installing the public jre option, you end up having two \bin dirs with java.exe:

  • %JAVA_HOME%\jre\bin

  • %JAVA_HOME%\bin

if you compare those dirs, there are a few files that are identical (java.exe etc), and a bunch that are either in one or the other. So far I used to add %JAVA_HOME%\bin to my Path environment var, but now I am wondering, does it make a difference? Is there any side effect to choose one or the other?

And would not be much cleaner if the installation had only one java.exe and \bin folder?

+1  A: 

The JDK embeds a version of the JRE installed in JAVA_HOME\jre, which is why you end up with both JAVA_HOME\bin (the JDK executables) and JAVA_HOME\jre\bin (the JRE executables). For the most part, I tend to add JAVA_HOME\bin to my PATH as it has a usable java and javaw, but also the various Java dev tools (javac, javadoc, etc., etc.). If you don't need any of that, you might just point to JAVA_HOME\jre\bin (but then why did you install the JDK)?

ig0774