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 :
Path Variables:
why the java -version command is not giving any result
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.