Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-843

It would be really cool if bigtop-detect-javahome were smarter and didn't pick a 32-bit JVM, or a 1.7 JVM set with default

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5.0
    • 0.6.0
    • general
    • None

    Description

      I see more and more folks with whacked versions of java configured in /usr/java/default or /usr/lib/jvm/default-java that are pointing to 32-bit JVMs or are simply not even a 1.6 JVM. I was wondering if we could do a bit more intelligence in this script and run a java -version to rule out a 32-bit JVM or a 1.7 JDK? Or would that be too error prone?

      if [ -z "$JAVA_HOME" ]; then
      for candidate in \
      /usr/lib/jvm/java-6-sun \
      /usr/lib/jvm/java-1.6.0-sun-1.6.0.*/jre/ \
      /usr/lib/jvm/java-1.6.0-sun-1.6.0.* \
      /usr/lib/jvm/j2sdk1.6-oracle \
      /usr/lib/jvm/j2sdk1.6-oracle/jre \
      /usr/lib/j2sdk1.6-sun \
      /usr/java/jdk1.6* \
      /usr/java/jre1.6* \
      /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.6.0-openjdk-1.6.* \
      /usr/lib/jvm/jre-1.6.0-openjdk* ; do
      if [ -e $candidate/bin/java ]; then
      export JAVA_HOME=$candidate
      break
      fi
      done
      fi

      Attachments

        Activity

          People

            mgrover Mark Grover
            rjustice Robert Justice
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: