'Cmd is not showing Java Version

I am running for Java -version & javac -version in my cmd, but it isn't showing any output. It just goes to the next line, and doesn't show anything. Can anyone here can help me. Any solution ,guys? I have also added an environment variable for it. I have attached a screenshot of it.

enter image description here



Solution 1:[1]

I got an answer to this.

Here this came after running the command where java.exe, here I see that I have two java.exe. On inside Common files and another inside Java. So , Because of this only I wasn't getting the answer.


PS C:\Users\absasahu> where.exe java.exe 
C:\Program Files\Common Files\Oracle\Java\javapath\java.exe 
                                            
C:\Program Files (x86)\Java\jre1.8.0_333\bin\java.exe

After deleting the first java.exe file, I got my work done. https://i.stack.imgur.com/KSKal.png

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 abhishek kr sahu