File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88
99## [ Unreleased]
10+ ### Changed
11+ - Improved logging for JAVA_HOME detection (#100 )
12+
1013### Fixed
1114- Fixed a crash when ` /usr/libexec/java_home ` returns no JVMs (#93 )
1215
Original file line number Diff line number Diff line change @@ -527,19 +527,27 @@ if [ -n "$JAVA_HOME" ] ; then
527527 if [[ $JAVA_HOME == /* ]] ; then
528528 # if "$JAVA_HOME" starts with a Slash it's an absolute path
529529 JAVACMD=" $JAVA_HOME /bin/java"
530+ stub_logger " [JavaSearch] ... parsing JAVA_HOME as absolute path to the executable '$JAVACMD '"
530531 else
531532 # otherwise it's a relative path to "$AppPackageFolder"
532533 JAVACMD=" $AppPackageFolder /$JAVA_HOME /bin/java"
534+ stub_logger " [JavaSearch] ... parsing JAVA_HOME as relative path inside the App bundle to the executable '$JAVACMD '"
533535 fi
534536 JAVACMD_version=$( get_comparable_java_version $( get_java_version_from_cmd " ${JAVACMD} " ) )
535537else
536- stub_logger " [JavaSearch] ... didn 't found JAVA_HOME"
538+ stub_logger " [JavaSearch] ... haven 't found JAVA_HOME"
537539fi
538540
539541
540542# check for any other or a specific Java version
541543# also if $JAVA_HOME exists but isn't executable
542544if [ -z " ${JAVACMD} " ] || [ ! -x " ${JAVACMD} " ] ; then
545+
546+ # add a warning in the syslog if JAVA_HOME is not executable or not found (#100)
547+ if [ -n " $JAVA_HOME " ] ; then
548+ stub_logger " [JavaSearch] ... but no 'java' executable was found at the JAVA_HOME location!"
549+ fi
550+
543551 stub_logger " [JavaSearch] Searching for JavaVirtualMachines on the system ..."
544552 # reset variables
545553 JAVACMD=" "
You can’t perform that action at this time.
0 commit comments