Through this series we see how to install Java. In this article, we will look specifically at installing on Windows.

Downloading

You can download Java from Java SE - Downloads page on the Oracle Technology Network.

Once you pick between the JDK and the JRE, you want to download the Windows x86 for 32-bit (for Java 7u3, it is jdk-7u3-windows-i586.exe), and Windows x64 for 64-bit (for Java 7u3, it is jdk-7u3-windows-x64.exe).

Setting JAVA_HOME

JAVA_HOME will vary depending on what you picked to install. The following assumes you installed in the default location.

VersionProduct32-bit/64-bit WindowsJAVA_HOME
Java 7 JREWindows x8632-bitC:\Program Files\Java\jre7
Java 7 JREWindows x8664-bitC:\Program Files (x86)\Java\jre7
Java 7 JREWindows x6464-bitC:\Program Files\Java\jre7
Java 7 JDKWindows x8632-bitC:\Program Files\Java\jdk1.7.0_version
Java 7 JDKWindows x8664-bitC:\Program Files (x86)\Java\jdk1.7.0_version
Java 7 JDKWindows x6464-bitC:\Program Files\Java\jdk1.7.0_version
Java 6 JREWindows x8632-bitC:\Program Files\Java\jre6
Java 6 JREWindows x8664-bitC:\Program Files (x86)\Java\jre6
Java 6 JREWindows x6464-bitC:\Program Files\Java\jre6
Java 6 JDKWindows x8632-bitC:\Program Files\Java\jdk1.6.0_version
Java 6 JDKWindows x8664-bitC:\Program Files (x86)\Java\jdk1.6.0_version
Java 6 JDKWindows x6464-bitC:\Program Files\Java\jdk1.6.0_version

Note: If you installed the JDK, in the table above the value for JAVA_HOME was dependent on the update version you picked. So for Java SE 7u3, it would be C:\Program Files\Java\jdk1.7.0_03.

See our article HowTo: Set an Environment Variable in Windows on how to set the environment variable.

Parts of this series