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.