Search code examples
javajava-home

Setting JAVA_HOME in Windows?


Where should JAVA_HOME be pointing to - JDK or JRE? I have seen that in few websites. It is set to JRE and in others it is to JDK. And is it dependant on Java version in any way?


Solution

  • JDK stands for Java Development Kit, while JRE stands for Java Runtime Environment. JAVA_HOME should point to a JDK not a JRE as the JDK is used for development purposes. JDK includes the compiler and other tools needed to develop Java applications while JRE does not.

    See How to set java_home on Windows 7? on how to change your JAVA_HOME.

    Source: Java SE 6 vs. JRE 1.6 vs. JDK 1.6 - What do these mean?