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