To install Java on 64-bit Windows, we download the Windows x64 build of JDK 25, run its installer or extract its ZIP file, point JAVA_HOME to the JDK folder, add its bin folder to Path and check the result with java -version. On Windows 10 and 11, the Windows Package Manager (winget) does the download and the installation in one command.
We install the JDK to compile and run Java programs from the terminal, and because IDEs, Maven, Gradle and many desktop tools look for it through JAVA_HOME. The JDK also runs every Java app, so we do not need a separate runtime on a developer machine.
The following example installs the Microsoft Build of OpenJDK 25 with winget in a Command Prompt, sets JAVA_HOME for the current user and checks the version in a new window.
:: 1. Download and install JDK 25 (adds the JDK bin folder to Path)
winget install Microsoft.OpenJDK.25
:: 2. Set JAVA_HOME for the current user (the folder name depends on the update)
setx JAVA_HOME "C:\Program Files\Microsoft\jdk-25.0.4.1-hotspot"
:: 3. Open a NEW Command Prompt, then check both tools
java -version
javac -version
Notice that setx changes the stored variable but not the window it runs in, so the check needs a new Command Prompt. The folder name contains the exact update version, so we copy it from File Explorer. We go through the choice of a JDK build, the installer and ZIP variants, the variables, the version check, and why only 64-bit Java exists for Windows today.
1. Choosing a JDK 25 Build for Windows
JDK 25 is the current long-term support (LTS) release, published in September 2025. Several vendors build it from the same OpenJDK source code and pass the same compatibility tests, so a program behaves the same on each of them. The builds differ in license terms, support periods and the installer they offer.
| Vendor build | Windows downloads | License and cost |
|---|---|---|
| Oracle JDK 25 | x64 .exe, .msi and .zip | Free under the Oracle No-Fee Terms and Conditions, with updates until September 2028 |
| Eclipse Temurin 25 | x64 .msi and .zip, JDK and JRE | Free, GPLv2 with Classpath Exception |
| Microsoft Build of OpenJDK 25 | x64 and ARM64 .msi and .zip, winget | Free, GPLv2 with Classpath Exception |
| Amazon Corretto 25 | x64 .msi and .zip | Free, GPLv2 with Classpath Exception |
For learning and for most projects, any of these builds works, so we pick the one our team or our company already uses. The download page asks for the operating system and the architecture. On a PC with an Intel or AMD processor, we pick Windows x64. On a Windows laptop with an ARM processor, such as a Snapdragon X model, we pick a Windows ARM64 (aarch64) build where the vendor offers one.

2. Installing JDK 25 With the Installer
The installer is the right choice for a single JDK on the machine. It copies the files, adds Java to Path and registers an uninstall entry in the Windows settings. We need administrator rights for it.
- Download the Windows x64 .msi or .exe file from the vendor page, for example jdk-25_windows-x64_bin.msi from Oracle.
- Double-click the file and keep the default folder unless we have a reason to change it. Oracle installs to C:\Program Files\Java\jdk-25, and Temurin to a folder under C:\Program Files\Eclipse Adoptium.
- In the Temurin and Microsoft installers, open the feature list and turn on Set JAVA_HOME variable, because it is off by default.
- Finish the wizard, close every open Command Prompt and terminal, and open a new one for the check in section 4.
The installers handle Path in different ways. The Oracle installer copies java.exe, javaw.exe, javac.exe and jshell.exe into C:\Program Files\Common Files\Oracle\Java\javapath and puts that folder on Path, but it does not set JAVA_HOME. The Temurin and Microsoft installers add the JDK bin folder to Path and set JAVA_HOME only when we select that feature.
For a silent installation on many machines, for example from a setup script for new team laptops, the Temurin MSI accepts the same features on the command line. The FeatureJavaHome feature sets JAVA_HOME.
msiexec /i OpenJDK25U-jdk_x64_windows_hotspot_25.0.4.1_1.msi ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome /quiet
3. Installing JDK 25 From the ZIP File
The ZIP file needs no administrator rights and changes nothing in Windows, so it suits developers who keep several JDK versions side by side, for example JDK 21 for an older project and JDK 25 for a new one. In return, we set both environment variables ourselves.
- Download the Windows x64 .zip file, for example OpenJDK25U-jdk_x64_windows_hotspot_25.0.4.1_1.zip from Temurin.
- Extract it to a folder without spaces that we keep for tools, such as C:\dev\jdk-25.0.4.1+1. The folder must contain bin, conf, lib and the release file at its top level, not inside a second subfolder.
- Press the Windows key, type environment and open Edit environment variables for your account.
- Under User variables, click New, enter JAVA_HOME as the name and C:\dev\jdk-25.0.4.1+1 as the value. The value is the JDK folder itself, without \bin.
- Select Path, click Edit, click New, enter %JAVA_HOME%\bin and move the entry to the top with Move Up.
- Click OK in both dialogs and open a new Command Prompt.
The entry %JAVA_HOME%\bin follows JAVA_HOME, so switching to another JDK later means changing one variable. A user variable needs no administrator rights, whereas System variables apply to every user on the machine. Windows builds the final Path from the system part first and the user part after it, so an older Java entry in the system Path wins over our user entry.
In PowerShell, the same user variables can be set with the .NET Environment class. We avoid the common setx PATH “%PATH%;…” call, because it copies the merged system and user Path into the user variable, and setx cuts values longer than 1,024 characters.
[Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\dev\jdk-25.0.4.1+1", "User")
The Java tools also work without any variable when we call them by their full path, such as C:\dev\jdk-25.0.4.1+1\bin\java -version. Build tools such as Maven read JAVA_HOME, though, so we set it anyway.
4. Checking the Java Installation
A new Command Prompt reads the updated variables. We check the runtime, the compiler and the variable, and where java lists every java.exe on Path in the order Windows searches them.
java -version
javac -version
echo %JAVA_HOME%
where java
The first two commands print the versions. The following output comes from Eclipse Temurin 25.0.4.1, and other vendors print their own name in the second and third lines.
openjdk version "25.0.4.1" 2026-08-18 LTS
OpenJDK Runtime Environment Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.4.1+1 (build 25.0.4.1+1-LTS, mixed mode, sharing)
javac 25.0.4.1
The words 64-Bit Server VM in the last java line confirm a 64-bit JVM. When the commands fail or show an old version, the cause is one of a few problems.
| Symptom | Cause | Fix |
|---|---|---|
| ‘java’ is not recognized as an internal or external command | The bin folder is not on Path, or the window was open before the change | Add %JAVA_HOME%\bin to Path and open a new window |
| java -version shows 1.8 or another old version | An older java.exe, such as the Oracle javapath folder of a Java 8 install, comes first on Path | Run where java, move our entry up or remove the old one |
| java works but javac is not found | Path points to a JRE or to javapath of a runtime-only install | Point Path to the JDK bin folder |
| Maven reports that JAVA_HOME is not defined correctly | JAVA_HOME ends with \bin or has quotes | Set it to the JDK folder without \bin and without quotes |
5. 32-bit vs 64-bit Java on Windows
For many years, Java downloads offered a 32-bit (x86) and a 64-bit (x64) build for Windows. A 32-bit process can address at most 4 GB of memory, and Windows gives it 2 GB by default, so a 32-bit JVM could not use a large heap. The bytecode is the same for both, so a class file compiled on one runs on the other.
Since JDK 24, there is no 32-bit Java for Windows at all, so every current JDK for Windows is a 64-bit build. JEP 479 removed the Windows 32-bit x86 port in JDK 24, because Windows 10, the last Windows version with a 32-bit edition, reached its end of life in October 2025. JEP 503 removed the remaining 32-bit x86 port for Linux in JDK 25. Eclipse Temurin still publishes 32-bit Windows builds of Java 8, 11 and 17, but none of Java 21 or 25.
A team that maintains an old desktop app with a 32-bit native DLL is the typical case that still needs 32-bit Java. A 64-bit JVM cannot load a 32-bit DLL and fails with UnsatisfiedLinkError, so such an app either stays on a 32-bit Java 17 or gets a 64-bit version of the DLL.
To check the bitness of the JVM from code, we read two system properties. The values in the comments come from a 64-bit JVM on an Intel or AMD processor.
String arch = System.getProperty("os.arch"); // "amd64" (x64), "aarch64" on ARM64, "x86" on old 32-bit JVMs
String dataModel = System.getProperty("sun.arch.data.model"); // "64"
The property os.arch describes the JVM build, not the processor, so a 32-bit JVM on 64-bit Windows reports x86. The property sun.arch.data.model is specific to HotSpot, so on other JVMs we rely on os.arch.
Windows on ARM can run x64 programs through emulation, so the x64 JDK works there too, but slower than a native ARM64 build. The Microsoft Build of OpenJDK publishes ARM64 builds for Windows, and a native build reports aarch64 for os.arch.
6. Java Installation FAQs
Once java -version works, licenses, several JDKs side by side and leftover Java installs are what we sort out next.
6.1. Is Java free to install on Windows?
Yes. Eclipse Temurin, Microsoft Build of OpenJDK and Amazon Corretto are free for any use, and Oracle JDK 25 is free under the Oracle No-Fee Terms and Conditions until September 2028. Older Oracle JDK updates released under the OTN license, such as recent Java 8 and Java 17 updates, need a paid subscription for commercial use.
6.2. Can we install several JDK versions on one Windows machine?
Yes. Each JDK lives in its own folder, so JDK 17, 21 and 25 can sit side by side. JAVA_HOME and the first java.exe on Path decide which one the terminal uses, and IDEs such as IntelliJ IDEA and Eclipse let us pick a JDK per project.
6.3. Do we still need to install a JRE?
No. The JDK contains a complete Java runtime, and Oracle has not offered a separate JRE since Java 11. The difference between JDK, JRE and JVM explains what each part contains.
6.4. How do we uninstall an old Java version?
We open Settings, go to Apps, Installed apps, search for Java or JDK and uninstall the old entries. A ZIP installation has no uninstall entry, so we delete its folder and remove its entries from Path and JAVA_HOME.
6.5. Should we set JAVA_HOME as a user or a system variable?
A user variable is enough for our own account and needs no administrator rights. A system variable is the right choice for build agents and services that run under another account, such as a Jenkins agent installed as a Windows service.
7. Conclusion
Installing Java on 64-bit Windows means picking an x64 JDK 25 build, or ARM64 on ARM laptops, installing it with the MSI or extracting the ZIP, and setting JAVA_HOME and Path. A new terminal and java -version confirm the result, and where java finds an older Java that gets in the way.
32-bit Java for Windows ended with JDK 24, so the only remaining choice is the vendor and the architecture. With the JDK in place, the Java tutorial continues with the first program.
8. References
- Oracle JDK 25 Installation on Microsoft Windows
- Install the Microsoft Build of OpenJDK
- Eclipse Temurin Windows Installer
- JEP 479, Remove the Windows 32-bit x86 Port
- JEP 503, Remove the 32-bit x86 Port
Happy Learning !!