From ab536988d8dfa06e516f3279960513586900cd47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Wed, 30 May 2018 17:56:36 +0200 Subject: [PATCH] Fix starter script It didn't consume correctly trailing info (eg date on java 10). This is a horribly mistake and makes the script fail on a JRE 10. We could consider updating the binary distribution for 6.4.0... @jsotuyod @adangel --- pmd-dist/src/main/scripts/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmd-dist/src/main/scripts/run.sh b/pmd-dist/src/main/scripts/run.sh index 0fde7f1445..7ff7e02438 100755 --- a/pmd-dist/src/main/scripts/run.sh +++ b/pmd-dist/src/main/scripts/run.sh @@ -76,10 +76,10 @@ check_lib_dir() { jre_specific_vm_options() { # java_ver is eg "18" for java 1.8, "90" for java 9.0 - java_ver=$(java -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*"/\1\2/p;') + java_ver=$(java -version 2>&1 | sed -n ';s/^.* version "\(.*\)\.\(.*\)\..*".*$/\1\2/p;') options="" - if [ $java_ver -ge 90 ] && [ "${APPNAME}" = "designer" ] + if [ "$java_ver" -ge 90 ] && [ "${APPNAME}" = "designer" ] then # open internal module of javafx to reflection options="--add-opens javafx.controls/javafx.scene.control.skin=ALL-UNNAMED" fi