how to check java_home in cmd linux code example Example: finda java home dirname $(dirname $(readlink -f $(which javac)))