No. Windows 10 does not come with Java pre-installed, and neither does Windows 11. If you need Java, you install a JDK (to develop) or use one that an application bundles. Check what is already on your machine by running java -version in a terminal.
Note that Windows 10 reached end of support on 14 October 2025, so for long-term use you should plan to move to Windows 11 or enrol in Microsoft's Extended Security Updates. Java itself still installs and runs on Windows 10.
Windows + R, type cmd and press Enter. PowerShell or Windows Terminal works too.If Java is installed you see output similar to this:
If you see 'java' is not recognized as an internal or external command, Java is either missing or not on your PATH. Also run javac -version to check whether you have a full JDK with the compiler.
Some programs install a private runtime in their own folder, for example IDEs and Minecraft Java Edition. These do not put java on your PATH, so java -version can fail even though a Java process runs on your PC.
Since Java 11 most vendors ship only a JDK, and the separate JRE download has mostly disappeared. The JDK includes the runtime, so it runs Java programs as well as compiling them. Pick a Long Term Support release. Java 21 and Java 25 are current LTS versions, and Java 8 or 11 only makes sense if an old application demands it.
| Distribution | Notes |
|---|---|
| Eclipse Temurin | Free, widely used OpenJDK build |
| Microsoft Build of OpenJDK | Free, supported by Microsoft |
| Amazon Corretto | Free, supported by Amazon |
| Oracle JDK | Oracle's build, check its license terms |
Windows 10 supports the winget package manager through App Installer. Open a terminal and run:
Close and reopen the terminal, then verify with java -version.
.msi installer for Windows x64 from your chosen vendor's official page.PATH and to set JAVA_HOME.Most MSI installers do this for you. If you installed from a ZIP file, set it yourself:
JAVA_HOME, and set it to the JDK folder, for example C:\Program Files\Eclipse Adoptium\jdk-21.0.5.11-hotspot.Path, click Edit, and add %JAVA_HOME%\bin.Create Hello.java:
Run it directly, with no separate compile step:
Java receives security fixes regularly, and Windows does not update a JDK installed from an MSI or ZIP file by itself. If you installed with winget, you can update it with one command:
To remove an old version, open Settings > Apps > Installed apps, pick the entry and choose Uninstall. After removing it, delete any leftover JAVA_HOME variable that points to a folder that no longer exists, otherwise tools may report confusing errors.
Keep these habits:
winget, never from third-party download pages.No. Windows itself does not depend on it. Only install Java for software that requires it or for Java development.
Install a JDK. It contains everything needed to run Java programs, and standalone JRE downloads are mostly no longer offered.
java -version say Java is not recognized?Either Java is not installed, or its bin folder is not on your PATH. Reopen the terminal after installing, or add the folder as shown above.
Yes. Install each one and point JAVA_HOME at the version you want, or let your IDE or build tool select it.
Windows 10 does not include Java. Check with java -version, install a current LTS JDK such as Temurin 21 with winget or an installer, make sure JAVA_HOME and PATH are set, and verify with a small program. Remember that Windows 10 itself is past its end of support date.