java check java version code example Example: java check java version java -version #for jre version javac -version # for java compiler version