unable to change java version in windows 10 among multiple versions

unable to change java version in windows 10 among multiple versions

I am using windows 10 64-bit. I have multiple Java versions installed.

Java 8
Java 11
Java 17

Now my problem is I am able to change Java versions. When I am checking the Java Version from the command line by the command java -version, it shows java 17. But at the environment variables, I have set Java 8.

    PS C:\Users\Dell> java -version
java version "17.0.3.1" 2022-04-22 LTS
Java(TM) SE Runtime Environment (build 17.0.3.1+2-LTS-6)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.3.1+2-LTS-6, mixed mode, sharing)

enter image description here

Even in the path variables, I have also set JDK 8.

Path Varriables

相关内容