check java version cmd

Java
java --version

Source

Also in Java: