HowTo: Install Java - Windows
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.
| Version | Product | 32-bit/64-bit Windows | JAVA_HOME |
|---|---|---|---|
| Java 7 JRE | Windows x86 | 32-bit | C:\Program Files\Java\jre7 |
| Java 7 JRE | Windows x86 | 64-bit | C:\Program Files (x86)\Java\jre7 |
| Java 7 JRE | Windows x64 | 64-bit | C:\Program Files\Java\jre7 |
| Java 7 JDK | Windows x86 | 32-bit | C:\Program Files\Java\jdk1.7.0_version |
| Java 7 JDK | Windows x86 | 64-bit | C:\Program Files (x86)\Java\jdk1.7.0_version |
| Java 7 JDK | Windows x64 | 64-bit | C:\Program Files\Java\jdk1.7.0_version |
| Java 6 JRE | Windows x86 | 32-bit | C:\Program Files\Java\jre6 |
| Java 6 JRE | Windows x86 | 64-bit | C:\Program Files (x86)\Java\jre6 |
| Java 6 JRE | Windows x64 | 64-bit | C:\Program Files\Java\jre6 |
| Java 6 JDK | Windows x86 | 32-bit | C:\Program Files\Java\jdk1.6.0_version |
| Java 6 JDK | Windows x86 | 64-bit | C:\Program Files (x86)\Java\jdk1.6.0_version |
| Java 6 JDK | Windows x64 | 64-bit | C:\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.