summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2019-02-18 16:00:36 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2019-02-18 16:32:01 +0900
commit436e7b79b24e9a91ef29c22f1ff33de8d9198ed6 (patch)
tree0eaecd6a67c65df7786346ad9bd1467d8dcf4021
parent73dfbc6b331adc87749dc39932bbd68665cae670 (diff)
gerrit.sh: Improve error message when JRE cannot be found
If a JRE cannot be found at the location specified by JAVA_HOME or container.javaHome, the server startup fails and an error message is displayed. Update the error message so that the reader realizes that while the JAVA_HOME and/or container.javaHome might be *set* the value in them might not be *valid*. An example of when this might be the case is when the java installation was upgraded and the location changed from: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre to: /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/jre and while the JAVA_HOME environment variable got update to the new location, container.javaHome did not and still pointed to the old (and now invalid) location. Change-Id: I24e0dc19781920e8901ef8743c847606ebd640ce
-rwxr-xr-xgerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh
index 3de01d982b..a76d018655 100755
--- a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh
+++ b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/init/gerrit.sh
@@ -259,9 +259,9 @@ if test -z "$JAVA" \
fi
if test -z "$JAVA" ; then
- echo >&2 "Cannot find a JRE or JDK. Please set JAVA_HOME or"
- echo >&2 "container.javaHome in $GERRIT_SITE/etc/gerrit.config"
- echo >&2 "to a >=1.7 JRE"
+ echo >&2 "Cannot find a JRE or JDK. Please ensure that the JAVA_HOME environment"
+ echo >&2 "variable or container.javaHome in $GERRIT_SITE/etc/gerrit.config is"
+ echo >&2 "set to a valid >=1.7 JRE location"
exit 1
fi