[KARAF-5467]Karaf doesn't recognize Java 9 on Ubuntu 16.04
@@ -213,7 +213,9 @@ checkJvmVersion() {
| awk '{print substr($3,2,length($3)-2)}' \
| awk '{print substr($1, 3, 3)}' \
| sed -e 's;\.;;g')
- if [ "x${VERSION}" = "x" ]; then
+ MAJOR_VERSION=$("${JAVA}" -version 2>&1 \
+ |awk -F '"' '/version/ {print $2}')
+ if [ "${MAJOR_VERSION:0:1}" -ge "9" ]; then
VERSION=90
fi
if [ "${VERSION}" -lt "80" ]; then
