We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f1940ee + a67441a commit c710052Copy full SHA for c710052
dist/bin/common
@@ -61,6 +61,14 @@ if [ ! -x "$JAVACMD" ] ; then
61
exit 1
62
fi
63
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
72
if [ -z "$JAVA_HOME" ] ; then
73
echo "Warning: JAVA_HOME environment variable is not set."
74
0 commit comments