Bug#1061059: javaws.sh fails to determine java version if extra java options exist
Christian Schwamborn
cs at mail.architektur.tu-darmstadt.de
Wed Jan 17 15:34:48 GMT 2024
With a little less 'cutting' it seems to work, but I tested it only
against openjdk 8, 11 and 17. I didn't understand the need of the first
call of "cut -d'-' -f1" anyways.
--- javaws_orig.sh 2024-01-17 16:25:24.601970808 +0100
+++ javaws.sh 2024-01-17 16:25:57.982161672 +0100
@@ -97,9 +97,9 @@
# Support Modular JDK (jigsaw):
MODULAR_JDK="NO"
fullversion=`${JAVA} -version 2>&1`
-version=`echo $fullversion | head -n 1 | cut -d'-' -f1 | cut -d'"' -f2
| cut -d'.' -f1`
+version=`echo $fullversion | head -n 1 | cut -d'"' -f2 | cut -d'.' -f1`
if [ "$version" -eq "1" ]; then
- version=`echo $fullversion | head -n 1 | cut -d'-' -f1 | cut -d'"'
-f2 | cut -d'.' -f2`
+ version=`echo $fullversion | head -n 1 | cut -d'"' -f2 | cut -d'.' -f2`
fi
if [ "$version" -ge "9" ]; then
MODULAR_JDK="YES"
More information about the pkg-java-maintainers
mailing list