Changing the Java version on Windows 10 can mean selecting a different JDK for the command line, for an IDE, or for one application. Installing another JDK does not automatically make every program use it, so first identify which Java environment you are trying to change.
See what the command line currently uses
Open Command Prompt or PowerShell and run java -version. Then run where java to see which executable Windows finds on PATH. For development work, javac -version can confirm the compiler version too.
Install the required JDK from a trusted distribution
Use the vendor or OpenJDK distribution your project supports. Common maintained distributions are available from established vendors and the OpenJDK ecosystem. Match the application’s required major version instead of assuming the newest JDK is always compatible.
Set JAVA_HOME when the tool uses it
Some build tools and servers read the JAVA_HOME environment variable. Set it to the intended JDK directory, then make sure PATH does not point to an unwanted Java installation earlier in the search order. Open a new terminal after changing environment variables.
IDEs can select Java independently
IntelliJ IDEA, Eclipse, Visual Studio Code extensions, Gradle, and Maven projects can have their own JDK configuration. If java -version is correct but the project still uses another release, inspect the IDE or build-tool settings.
Do not remove an old Java runtime until dependencies are understood
A legacy business application may require a specific Java release. Confirm dependencies before uninstalling versions. Unsupported Java versions can pose security risk, so isolate or modernize software that cannot move to a maintained runtime.
Windows 10 support context
Microsoft ended standard free Windows 10 support on October 14, 2025. Java has a separate support lifecycle, and keeping the JDK current does not make an unsupported Windows host secure.
Verify after every change
Open a fresh terminal and rerun the version commands after modifying PATH or JAVA_HOME. Existing terminal windows keep their old environment, which can make a correct configuration change appear to have failed.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.