For Java development on Windows 11, install a JDK (Java Development Kit), not just a runtime. The JDK includes java for running applications and javac for compiling source code.
As of August 7, 2026, JDK 26.0.2 is the latest feature release. JDK 25.0.4 is the current Long-Term Support (LTS) release, while JDK 21.0.12 is the previous LTS release. Unless your project requires another version, JDK 25 LTS is the sensible default for long-term stability.
Before installing Java: choose the right JDK
| Choice | When to use it |
|---|---|
| JDK 25 LTS | Best general-purpose choice when a project does not specify a Java version. |
| JDK 26 | Use it when the project requires Java 26 or you specifically need the newest feature release. |
| JDK 21 LTS | Use it for software, frameworks, or tutorials that require Java 21. |
Check your project’s requirements before downloading. Different JDK versions can coexist on the same Windows 11 computer, so installing JDK 25 does not prevent you from also keeping JDK 21.
Download the Windows 11 installer
- Open the Oracle Java Downloads page.
- Locate the JDK release you need.
- Open the Windows download section.
- Choose the x64 Installer package.
Oracle provides three current Windows x64 package types:
| Package | File type | Best for |
|---|---|---|
| x64 Installer | .exe | Most users and normal interactive installation. |
| x64 MSI Installer | .msi | Enterprise deployment, scripting, and Windows Installer commands. |
| x64 Compressed Archive | .zip | Portable or manual installations without a standard wizard. |
For JDK 26, the files are named similar to:
jdk-26_windows-x64_bin.exe
jdk-26_windows-x64_bin.msi
jdk-26_windows-x64_bin.zip
When download integrity matters, compare the downloaded file’s SHA-256 checksum with the value shown on Oracle’s download page. The version and file size displayed by Oracle can change when a new update is released.
Install Java with the EXE installer
The EXE package is the simplest option for most Windows 11 users.
- Open the downloaded .exe file, such as jdk-26_windows-x64_bin.exe.
- Select Yes if Windows displays an administrator permission prompt.
- Follow the installation wizard.
- Keep the default installation folder unless your project or organization requires a different location.
- Complete the installation.
Administrator privileges are required for Oracle’s Windows JDK installation. The default folder follows this pattern:
C:\Program Files\Java\jdk-<FEATURE>
Examples include:
C:\Program Files\Java\jdk-26
C:\Program Files\Java\jdk-26.0.1
Oracle may also create a latest junction, such as C:\Program Files\Java\latest\jdk-26, that points to the newest installed JDK 26 feature release. Do not replace or overwrite a JDK folder while Java programs, IDEs, servers, or build tools are running.
Install Java with the MSI package
Use the MSI package for Windows Installer-based deployment or automated installation. Administrator permissions are still required.
Interactive MSI installation
- Double-click the downloaded MSI file, for example jdk-26_windows-x64_bin.msi.
- Follow the Windows Installer prompts.
- Finish the installation.
Install from an elevated Command Prompt
Open Windows Terminal (Admin) or Command Prompt (Admin), change to the directory containing the MSI, and run one of these commands:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #2
Basic installation:
msiexec.exe /i jdk-26_windows-x64_bin.msi
Silent installation:
msiexec.exe jdk-26_windows-x64_bin.msi /qn
Installation with a log file:
msiexec.exe /i jdk-26_windows-x64_bin.msi /L C:\path\setup.log
Replace C:\path\setup.log with a valid directory and file path. Review the end of the log if you need to confirm the installation result.
Install Java from the ZIP archive
The ZIP package does not install through a wizard. It is useful when you need a portable JDK or do not want to use the standard installer.
- Extract the ZIP file to a permanent location, such as C:\Program Files\Java\jdk-26.
- Set JAVA_HOME to the extracted JDK folder.
- Add the JDK’s bin folder to Path.
- Open a new terminal and verify the installation.
Do not point JAVA_HOME at the ZIP file or at the bin folder. It must point to the JDK root.
Free tools Windows power users keep installed
One-click scans. No signup required.
Verify the Java installation
Close any terminal that was open during installation. Then open a new Windows Terminal, PowerShell, or Command Prompt window and run:
java -version
javac -version
A correctly installed JDK should return version information for both commands. The first command checks the Java launcher; the second checks the Java compiler.
To see which executable Windows is finding, run:
where java
where javac
These commands are particularly useful when multiple Java versions are installed. Windows uses the first matching executable found through the directories in Path.
To check JAVA_HOME in Command Prompt:
echo %JAVA_HOME%
In PowerShell, use:
$Env:JAVA_HOME
If Command Prompt prints the literal text %JAVA_HOME%, or PowerShell returns no value, the variable is not defined in that environment.
Set JAVA_HOME and Path in Windows 11
Many IDEs, build tools, application servers, and scripts use JAVA_HOME. The java command itself can work through Path without it, but setting both variables avoids compatibility problems.
Open the Environment Variables dialog
- Open Control Panel.
- Select System.
- Select Advanced System Settings.
- In System Properties, open the Advanced tab.
- Select Environment Variables….
You can add variables under User variables for [your account], which affects only your account, or under System variables, which affects all users and normally requires administrator permission.
Add JAVA_HOME
- In the desired variables section, select New….
- For Variable name, enter JAVA_HOME.
- For Variable value, enter the JDK root directory, for example:
C:\Program Files\Java\jdk-26
Select OK. The value must not end in bin.
Add the JDK to Path
- Select Path in the same section.
- Select Edit….
- Select New.
- Add:
%JAVA_HOME%\bin
- Select OK in each open dialog.
- Close and reopen Windows Terminal, PowerShell, Command Prompt, your IDE, and any build tools.
Do not delete the existing Path entries and replace them with Java’s path. Other programs depend on those entries. If older Java directories appear before %JAVA_HOME%\bin, remove obsolete entries or move the intended JDK entry higher in the list.
Why Oracle’s javapath folder can be confusing
Oracle’s installer can place Java helper executables in:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →C:\Program Files\Common Files\Oracle\Java\javapath
Documented helper files include java.exe, javaw.exe, javac.exe, and jshell.exe. This folder is separate from the actual JDK’s bin directory.
If java -version and javac -version show an unexpected version, use where java and where javac to identify the path being used. Then correct the order of your Path entries or configure the relevant IDE or build tool separately.
Fix common Java installation problems
java works, but javac does not
This usually means Windows is finding a runtime-only installation, an older Java path, or a stale environment inherited by the terminal. Run:
where java
where javac
echo %JAVA_HOME%
Confirm that both commands point to the intended JDK, not an old runtime. Then open a new terminal and test again. If you installed a ZIP package, make sure its extracted bin folder was added to Path.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #4
JAVA_HOME points to …\bin
Correct the value so it points to the JDK root:
JAVA_HOME=C:\Program Files\Java\jdk-26
Use the separate executable path in Path:
%JAVA_HOME%\bin
Some tools append bin to JAVA_HOME themselves. If the variable already ends in bin, those tools can construct an invalid path.
The old Java version is still reported
Installing a newer JDK does not automatically change every command-line or application setting. Run:
where java
where javac
Check the order of Java-related entries in Path, check JAVA_HOME, and review the Java runtime selected inside your IDE or build system. Close and reopen affected applications after making changes.
The terminal does not see the new variables
Environment variables are copied into a process when it starts. A terminal that was already open keeps the old values. Close and reopen the terminal and affected applications. A full Windows restart is normally not required just to apply a regular environment-variable change.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsThe installer requests administrator access
Oracle’s EXE and MSI installations require administrator privileges. Sign in with an account permitted to install software, or launch the installer through an elevated administrative process.
The installer reports that files are in use
Stop running Java applications, IDEs, build tools, application servers, and background Java processes. Updating or replacing a JDK directory while files are in use can cause installation or replacement errors.
The wrong Windows package was downloaded
Oracle’s current Windows JDK downloads are x64 packages. Avoid relying on old Java 8-era guides that direct you to an x86 installer when installing current Oracle JDK 25 or JDK 26 releases.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Uninstall an older JDK
Keep older JDKs if a project still needs them. If you no longer need one, open Settings > Apps > Installed apps, search for the Java or JDK entry, select the three-dot menu, and choose Uninstall.
Recommended Free Tools
Best Value
After uninstalling, check JAVA_HOME and Path. Remove entries that point to the deleted JDK, but do not remove unrelated entries from Path.
FAQ
Should I install Java or the JDK on Windows 11?
Install the JDK for development. It includes the Java runtime and tools such as javac. A runtime-only package is insufficient for compiling Java source code.
Which Java version should I install?
Use JDK 25 LTS when you want the current long-term-support release and your project has no specific requirement. Use JDK 26 if the project requires it or you need the latest feature release. Always check the project’s compatibility requirements first.
Do I need to set JAVA_HOME for Java to work?
Not always. The java command can be found through Path. However, many build tools, IDEs, scripts, and application servers use JAVA_HOME, so setting it to the JDK root is recommended.
Should JAVA_HOME include the bin folder?
No. Set it to the JDK root, such as C:\Program Files\Java\jdk-26. Add %JAVA_HOME%\bin separately to Path.
Do I have to restart Windows after installing Java?
Usually not. Open a new terminal and restart applications that were open during installation. Those processes may still contain the old environment variables.
Can I install multiple JDK versions on one Windows 11 computer?
Yes. Multiple JDK versions can coexist. The active command-line version depends mainly on the order of Java entries in Path and the value of JAVA_HOME. IDEs and build tools may use their own configured runtime.
The Bottom Line
Install the x64 JDK version your project supports, verify both java -version and javac -version, and set JAVA_HOME to the JDK root if your tools require it. When several JDKs are installed, use where java and where javac to find the version Windows is actually using.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
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.

