Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7.0
    • Component/s: None
    • Labels:
      None

      Description

      If JAVA_HOME is not set, bigtop-detect-javahome has a very quirky search order that can have surprising behavior.

      Some problems:

      • 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

      1. attempt to find java
        if [ -z "$JAVA_HOME" ]; then
        for candidate in \
        /usr/lib/j2sdk1.6-sun \
        /usr/lib/jvm/java-6-sun \
        /usr/lib/jvm/java-1.6.0-sun-1.6.0.* \
        /usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre/ \
        /usr/lib/jvm/j2sdk1.6-oracle \
        /usr/lib/jvm/j2sdk1.6-oracle/jre \
        /usr/java/jdk1.6* \
        /usr/java/jre1.6* \
        /usr/java/jdk1.7* \
        /usr/java/jre1.7* \
        /usr/lib/jvm/j2sdk1.7-oracle \
        /usr/lib/jvm/j2sdk1.7-oracle/jre \
        /Library/Java/Home \
        /usr/java/default \
        /usr/lib/jvm/default-java \
        /usr/lib/jvm/java-openjdk \
        /usr/lib/jvm/jre-openjdk \
        /usr/lib/jvm/java-1.7.0-openjdk* \
        /usr/lib/jvm/java-7-openjdk* \
        /usr/lib/jvm/java-7-oracle* \
        /usr/lib/jvm/java-1.6.0-openjdk \
        /usr/lib/jvm/java-1.6.0-openjdk-* \
        /usr/lib/jvm/jre-1.6.0-openjdk* ; do

        Activity

        Jolly Chen created issue -
        Sean Mackrory made changes -
        Field Original Value New Value
        Assignee Sean Mackrory [ mackrorysd ]
        Sean Mackrory made changes -
        Sean Mackrory made changes -
        Sean Mackrory made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Sean Mackrory made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Roman Shaposhnik made changes -
        Fix Version/s 0.7.0 [ 12324362 ]
        Roman Shaposhnik made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Sean Mackrory
            Reporter:
            Jolly Chen
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development