how to find out what version of java i have code example Example 1: how to check which java version i have java -version Example 2: check java version java --version