Skip to content

Commit a67441a

Browse files
committed
Fix #3304: Launch script now requires Java 8
1 parent b8d1e41 commit a67441a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dist/bin/common

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ if [ ! -x "$JAVACMD" ] ; then
6161
exit 1
6262
fi
6363

64+
# parses 1.7, 1.8, 9, etc out of java version "1.8.0_91"
65+
JAVA_VERSION=$("$JAVACMD" -version 2>&1 | grep ' version "' | sed 's/.*version "\([0-9]*\)\(\.[0-9]*\)\{0,1\}\(.*\)*"/\1\2/; 1q')
66+
67+
if [ "$JAVA_VERSION" != "1.8" ] ; then
68+
echo "Error: Java 8 is required, actual $JAVA_VERSION"
69+
exit 1
70+
fi
71+
6472
if [ -z "$JAVA_HOME" ] ; then
6573
echo "Warning: JAVA_HOME environment variable is not set."
6674
fi

0 commit comments

Comments
 (0)