how to check my java sdk version code example Example 1: check java version java --version Example 2: check jdk version java -version