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

Relax the requirements to set the JAVA_HOME for startup scripts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 5.0.0
    • None
    • None

    Description

      With 5.0 we have changed the startup scripts and extended it with requirement to set JAVA_HOME or JRE_HOME env. variables. These variables are not set always by default in Linux distributions. I've tested Ubuntu 16.04 with OpenJDK (1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13) and the env variables are not set. This is working fine with 4.14 but after upgrade to 5.0 it requires the env. variable to be set.

      Previously we have catered for this - see java_type=$(type -p java) in the following snippet:

       if [ -n "$JAVA_HOME" ]; then
              # invalid JAVA_HOME set
              echo "-------------------------------------------------------------------------------"
              echo "  JAVA_HOME \"$JAVA_HOME\" does not point to a valid Java home directory."
              echo "-------------------------------------------------------------------------------"
          else
              # JAVA_HOME not set
              java_type=$(type -p java)
              if [ -n java_type ]; then
                  # java is in PATH
                  JAVA_BINARY=java
              fi
          fi
       

      This was done in set-java-home.sh. As this might look like a regression from customer point of view, I think we should fix it and relax the constraint. I don't think it is actually bringing us some real benefits.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              abrokes Adam Brokes
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Backbone Issue Sync