Persimmonium
Persimmonium

Reputation: 15789

what \bin to add to system Path env var from a jdk

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:

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?

Upvotes: 1

Views: 559

Answers (1)

ig0774
ig0774

Reputation: 41287

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)?

Upvotes: 2

Related Questions