how to find your java home execute: code example Example: finda java home dirname $(dirname $(readlink -f $(which javac)))