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" __ This is the maintainer address of Debian's Java team <https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-maintainers>. Please use debian-j...@lists.debian.org for discussions and questions.