- `which` isn't installed by default on all distros.
- `which` doesn't resolve exactly like the shell, potential bugs.
- `which` unnecessary spawns a new process.
Change-Id: Ie89ea78b6f4cfb9c5415e889ec0393924870d883
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
if [[ -z ${JAVA_HOME} ]]; then
# Find the actual location of the Java launcher:
- java_launcher=`which java`
+ java_launcher=`command -v java`
java_launcher=`readlink -f "${java_launcher}"`
# Compute the Java home from the location of the Java launcher: