version of java to use code example Example: check Version of java $ java -version java version "1.8.0_121"