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