Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For Java development on Windows 11, install the Java Development Kit (JDK). It includes the Java runtime, compiler, debugger, and other development tools. A separate JRE download is not the right package for compiling Java programs.

The examples below use Oracle JDK on a standard 64-bit Intel or AMD Windows 11 PC. If you only need to run an old Java application, check its requirements first; many modern applications bundle their own Java runtime.

Before you download Java

Open Settings → System → About and check System type. Most Windows 11 computers show 64-bit operating system, x64-based processor. For that hardware, download the Windows x64 package.

Oracle currently lists these relevant releases:

Release Use case Oracle no-fee update period noted on the download page
JDK 26 Current feature release Check the current Oracle terms
JDK 25.0.4 Current LTS release Free for production and redistribution under the Oracle No-Fee Terms and Conditions through September 2028
JDK 21.0.12 Older LTS release for software that requires it Corresponding no-fee update period ends in September 2026; later updates may require a commercial license outside Oracle’s free grants

If a school, employer, or project specifies a Java version, use that version instead of automatically choosing the newest one. Otherwise, JDK 25 is the practical long-term-support choice, while JDK 26 provides the newest feature release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 1: Open Oracle’s JDK download page

Go to Oracle’s Java Downloads page. Select the required JDK release, then locate the Windows section.

For a normal x64 Windows 11 installation, choose Windows x64 Installer. The downloads use filenames similar to:

jdk-26_windows-x64_bin.exe
jdk-26_windows-x64_bin.msi
jdk-26_windows-x64_bin.zip

Choose the .exe for a normal interactive installation. The .msi is useful for Windows Installer deployments and scripted business installations. The .zip is a portable archive; it does not provide the usual installer workflow and requires you to configure the installation yourself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not confuse the current JDK download with the old java.com Java 8 page. That page contains legacy Java 8 material, including browser-plugin and Java Web Start information. It is not the current procedure for installing a JDK on Windows 11.

Step 2: Start the installer

  1. Open File Explorer → Downloads.
  2. Double-click the downloaded .exe file, such as jdk-26_windows-x64_bin.exe.
  3. Approve the Windows security prompt if it appears. Installing the JDK requires administrator privileges.
  4. Follow the instructions shown by the installer.

The exact wizard screens and button labels can vary by JDK release, so do not rely on a fixed sequence of buttons. If Windows asks whether to allow the app to make changes to the device, verify that the publisher is Oracle before approving it.

Step 3: Keep or select the installation folder

Unless your organization has a specific layout, keep the default location. Oracle documents the standard path as:

C:\Program Files\Java\jdk-<FEATURE>

For example, JDK 25 may be installed in:

C:\Program Files\Java\jdk-25

A versioned update can use a path such as:

C:\Program Files\Java\jdk-25.0.1

Accept the installation option and allow setup to finish. Do not replace an existing JDK folder while Java programs, IDEs, build tools, or Java services are running. Close those applications first.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For JDK 25, Oracle documents a junction at C:\Program Files\Java\latest\jdk-25 that points to the latest installed JDK 25 feature release. It is removed when the last JDK 25 installation is uninstalled; do not assume the same junction name exists for other feature releases.

Oracle’s JDK installer also makes Java command shims available under:

C:\Program Files\Common Files\Oracle\Java\javapath

That directory can contain java.exe, javaw.exe, javac.exe, and jshell.exe. The complete JDK executables remain in the installation folder’s bin directory.

Step 4: Verify Java and the compiler

After setup completes, open a new Command Prompt or PowerShell window. A new terminal is important because it receives the environment inherited after installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run:

java -version
javac -version

java -version checks the Java launcher. javac -version checks the Java compiler, which confirms that you installed a JDK rather than only a runtime.

For a JDK 25 installation, the first command should report a 25-based version. JDK 26 should report a 26-based version. The precise update and build text will vary.

To see exactly which files Windows is using, run:

where java
where javac

If the results point to C:\Program Files\Common Files\Oracle\Java\javapath, Windows is using Oracle’s command shims. If they point to another JDK directory, an older installation or a manually configured PATH entry is taking priority.

Step 5: Configure Java for development

You do not normally need to create JAVA_HOME just to run java after installing Oracle’s JDK. Development tools such as Maven, Gradle, IDEs, and custom scripts commonly use it, however.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To set it through the Windows interface:

  1. Press Windows, search for environment variables, and select Edit the system environment variables.
  2. In System Properties, open the Advanced tab and select Environment Variables.
  3. Under System variables, select New.
  4. Set the variable name to JAVA_HOME.
  5. Set its value to the JDK directory, for example C:\Program Files\Java\jdk-25. Do not add bin to JAVA_HOME.
  6. Select OK on each dialog, then open a new terminal.

Test it with:

echo %JAVA_HOME%

In PowerShell, use:

$env:JAVA_HOME

If a tool still selects the wrong JDK, inspect where java and where javac first. Having multiple JDKs installed does not guarantee that Windows will select the newest one; the first matching executable in the effective PATH wins.

Optional: install from the MSI or command line

The interactive .exe is simplest for one PC. Administrators can use the MSI from an elevated Command Prompt:

msiexec.exe /i jdk-25_windows-x64_bin.msi

For a silent installation:

msiexec.exe jdk-25_windows-x64_bin.msi /qn

To create an installation log:

msiexec.exe /i installer.msi /L C:\path\setup.log

Oracle also documents silent installation of the executable:

jdk-25_windows-x64_bin.exe /s

Use the actual filename you downloaded. Oracle states that ADDLOCAL is unnecessary because the installer installs all components by default.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common installation problems

“System error during decompression”

Check free space on the drive containing Windows’ temporary directory. The installer may need temporary space even when the final JDK folder has sufficient room.

Windows Installer error 1722

Oracle associates this error with an installation path containing characters unsupported by the system locale’s code page. Try a path using characters supported by that code page and ensure the user and system locales are compatible.

java -version shows Java 8 after installing a newer JDK

Oracle documents a conflict in which installing JRE 8 after JDK 25 places the Java 8 javapath ahead of the newer JDK. Run where java to confirm which executable is selected. Oracle’s documented fix is to uninstall and reinstall JDK 25.

An old Java installation prevents setup

A failed uninstall can leave Windows Installer or registry entries that interfere with later installations. Use Microsoft’s Program Install and Uninstall troubleshooter before attempting manual registry changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Manual registry editing is risky. If it becomes unavoidable, export the relevant registry area first using File → Export, so it can be restored with File → Import if necessary.

FAQ

Should I install Java or the JDK on Windows 11?

Install the JDK if you plan to write or compile Java programs. It includes the runtime and the javac compiler. A separate JRE is not required for normal Java development.

Where should Java be installed on Windows 11?

The normal Oracle location is C:\Program Files\Java\jdk-<FEATURE>, such as C:\Program Files\Java\jdk-25. Keeping the default path avoids many tool and permission problems.

Do I need to set JAVA_HOME?

Not merely to run java after an Oracle installation. Maven, Gradle, IDEs, and scripts often use JAVA_HOME, so set it to the JDK folder when those tools require it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How can I tell which Java installation Windows is using?

Open a new terminal and run where java and where javac. These commands list the executables found through your current PATH order.

Is Java still required as a browser plugin?

No. Current Java applications do not normally require a browser plugin. Browser-plugin, applet, and Java Web Start instructions on java.com refer to legacy Java 8 material.

The Bottom Line

Download the Windows x64 JDK from Oracle, run the .exe, keep the default C:\Program Files\Java location, and verify both java -version and javac -version in a new terminal. Add JAVA_HOME only when your development tools need it, and use where java whenever multiple Java versions cause confusion.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.