From cdb85d5974d5f9cc985b233d1f80d1cb5251c188 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Wed, 16 May 2018 14:26:59 +0100 Subject: [PATCH 1/2] #1604 upgrade java version check to accept all versions greater than 6 --- refine | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/refine b/refine index 798152ab6..55da9fdfd 100755 --- a/refine +++ b/refine @@ -839,10 +839,8 @@ checkJavaMajorVersion() { # Java 9+ starts with x using semver versioning major=`echo ${java_ver} | sed -E 's/([0-9]+)(-ea|(\.[0-9]+)*)/\1/g'` fi - - JAVA_VERSION=$(echo ${major} | egrep '^(6|7|8|9)') - if [ -z "$JAVA_VERSION" ] ; then - error "OpenRefine requires Java version 6 or later. If you have multiple versions of Java installed, please set the environment variable JAVA_HOME to the correct version." + if (( ${major} < 7 )); then + error "OpenRefine requires Java version 7 or later. If you have multiple versions of Java installed, please set the environment variable JAVA_HOME to the correct version." fi } From 8798275b40b53b81d004ff335de53b92038926f6 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 17 May 2018 16:12:59 +0100 Subject: [PATCH 2/2] #1605 add warning for java versions greater than 9 --- refine | 3 +++ 1 file changed, 3 insertions(+) diff --git a/refine b/refine index 55da9fdfd..41461695d 100755 --- a/refine +++ b/refine @@ -842,6 +842,9 @@ checkJavaMajorVersion() { if (( ${major} < 7 )); then error "OpenRefine requires Java version 7 or later. If you have multiple versions of Java installed, please set the environment variable JAVA_HOME to the correct version." fi + if (( ${major} > 9 )); then + echo "WARNING: OpenRefine is not tested and not recommended for use with Java versions greater than 9." + fi } # -------------------------- script -----------------------------