Search code examples
javajava-8

Java -version is not showing any version or error


I have added java path in system variables, I tried to check java version by java -version but I am not getting any error or any version : enter image description here

Path Variables:

enter image description here

why the java -version command is not giving any result


Solution

  • I observed my Environment Variables , there are some of the paths added for Oracle :

    i.e. C:\Program Files\Common Files\Oracle\Java\javapath

    I have removed this paths as it was not in use. And it started showing me correct versions.