Switch Between the Java Versions (On Windows)

Step 1. Remove all PATH entries pointing to any JDK. For example:

C:\Program Files\Java\jdk1.8.0_311\bin
C:\Program Files\Java\jdk-23

Step 2. Remove all PATH entries pointing to javapath. For example:

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

Step 3. Set environment variable JAVA_HOME pointing to the required JDK. For example:

JAVA_HOME=C:\Program Files\Java\jdk-23

Use either the Environment variables applet in Windows Settings, or the command line:

setx JAVA_HOME <Path to Java installation>

Example:

setx JAVA_HOME "C:\Program Files\Java\jdk-23"

Step 4. Prepend the PATH entry for the version 1.8 of Java with %JAVA_HOME%\bin.

 

Contact Us

Privacy Policy

Copyright © 2026 Querix, (UK) Ltd.