check java version terminal code example Example 1: check java version in cmd java -version Example 2: how to see list of java of versions in mac /usr/libexec/java_home -V