how to check home directory of java inununtu code example Example: finda java home dirname $(dirname $(readlink -f $(which javac)))