how to check java version installed on windows code example Example 1: check java version in cmd java -version Example 2: check java version java --version