javasystem-variable

"java -version"in cmd gives no result


I tried to install java 14 manually on Windows 10. I set the System Variables as in this picture.

But when I use the command "java -version" literally nothing happens...

C:\WINDOWS\system32>java -version

C:\WINDOWS\system32>

Something must be wrong, but I can't figure what...


Solution

    1. Move C:\Program Files\Java\jdk-14.0.2\bin\java to the beginning in the PATH variable.
    2. Important - Open a new cmd window and use the command java -version. Any already open cmd windows do not reflect the settings that you do in the environment variables form/window.