gsh.sh: If directory java-1.8.0-amazon-corretto exists, it uses it as JAVA_HOME

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • 5.12.2, 4.15.4, 5.13.0
    • Affects Version/s: 2.5.29
    • Component/s: gsh
    • None

         136	if [ -n "$JAVA_HOME" ]; then
         137	  JAVA="$JAVA_HOME/bin/java"
         138	else
         139	  # if in container just use that
         140	  if [ -d /usr/lib/jvm/java-1.8.0-amazon-corretto ]; then
         141	    JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto
         142	    JAVA="$JAVA_HOME/bin/java"
         143	  else
         144	    JAVA=java
         145	
         146	  fi
         147	fi
      

      An implementer had created a java-1.8.0-amazon-corretto directory just for a cert, GSH picked it up and set it for JAVA_HOME, even though the binaries weren't there. This check doesn't need to be in gsh.sh anymore. Just the `JAVA="$JAVA_HOME/bin/java"` and  `JAVA=java` code should work for everybody.

            Assignee:
            Chris Hyzer (upenn.edu)
            Reporter:
            Chad Redman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: