Affects Version/s: None
Fix Version/s: 0.7.0
If JAVA_HOME is not set, bigtop-detect-javahome has a very quirky search order that can have surprising behavior.
- because the "defaults" (like /usr/java/default, /usr/lib/jvm/default-java, /Library/Java/Home) are in the middle of the search list, bigtop will pick up other random JDKs instead of the 'default' the user already has set up on the system.
- due to use of wildcards, earlier minor versions can be preferred over later minor versions, e.g. /usr/java/jdk1.6* will find 1.6.0_31 before 1.6.0_43, which is probably not what the user wants.
- 1.6 and 1.7 preference order is not consistent (e.g. generally 1.6 is preferred over 1.7 but not for openJDK)
This is related to previous issue: https://issues.apache.org/jira/browse/BIGTOP-843
- attempt to find java
if [ -z "$JAVA_HOME" ]; then
for candidate in \
/usr/lib/jvm/jre-1.6.0-openjdk* ; do