Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-12659

Linux installer does not recognize installed JDK11 instances

    XMLWordPrintable

Details

    Description

      Issue Summary

      When JDK 11 is installed, the Bitbucket installer still extracts and configures itself to use the bundled JRE.

      Steps to Reproduce

      1. Install JDK11 on server
      2. Set environment variable for JAVA_HOME and JRE_HOME to point to the JDK installation
      3. Run the Bitbucket Linux installer
        For Windows, see BSERV-11985

      Expected Results

      • The installed version of Java is found
      • The bundled JRE is not extracted to the Bitbucket install directory
      • The set-jre-home.sh is set to use what is set.

      Actual Results

      • The bundled JRE is extracted to the Bitbucket install directory
      • The JRE_HOME is set to use the bundled JRE

      Workaround

      Modify $BITBUCKET_INSTALLATION/bin/set-jre-home.sh to explicitly point to your preferred JDK version:

      if [ -z "$JRE_HOME" ]; then
          if [ -z "$JAVA_HOME" ]; then
              # If JRE_HOME and JAVA_HOME are not defined, edit this line to define JRE_HOME
              JRE_HOME="/usr/lib/jvm/java-11-oracle"
      
      

      Notes

      In JDK11 release notes, it notes that the JRE is no longer offered and only the JDK. This is evident in the structure difference:

      JDK8

      /usr/lib/jvm/java-8-oracle/jre/bin 
      

      JDK11

      /usr/lib/jvm/java-11-oracle/bin 
      

      This too applies for openjdk.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mwilliams@atlassian.com Mark A.
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync