How can I set environment variable for java jdk bin so that it shows same version in command prompt

175 Views Asked by At

I have set the Path variable in Environment Variables to C:\Java\jdk-15\bin which is the latest jdk I've recently downloaded from official Oracle site.

enter image description here

But, when I try to check the Java version from any other directory, it shows the version as below:

enter image description here

I have tried running the same command from C:\ too. It shows the same. Is this how it is supposed to look or am I doing something wrong here? I have got couple of jdk versions already installed on the system. Could this be cause of the older versions lying around in the system? Should I have uninstalled older versions before installing jdk-15?

0

There are 0 best solutions below