View Issue Details

IDProjectCategoryView StatusLast Update
0018177CentOS-7javapackages-toolspublic2021-04-30 18:35
Reportervokac Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version7.9.2009 
Summary0018177: build-classpath no longer works with Java 16 installed
Descriptionbuild-classpath script used to resolve full JAR path no longer works with latest Java 16
Steps To Reproduceinstall
* javapackages-tools-3.4.1-11.el7.noarch
* java-latest-openjdk-headless-16.0.0.0.36-1.rolling.el7.x86_64

execute
$ build-classpath log4j
/usr/bin/build-classpath: Unable to determine Java version
Additional InformationFunction "set_jvm_dirs" implemented in /usr/share/java-utils/java-functions use regex than can't match new Java 16 version format

$ /usr/lib/jvm/java/bin/java -version
openjdk version "16" 2021-03-16
OpenJDK Runtime Environment 21.3 (build 16+36)
OpenJDK 64-Bit Server VM 21.3 (build 16+36, mixed mode, sharing)

because it expect at least one decimal number like in case of Java 15

$ /usr/lib/jvm/java/bin/java -version
openjdk version "15.0.2" 2021-01-19
OpenJDK Runtime Environment 20.9 (build 15.0.2+7)
OpenJDK 64-Bit Server VM 20.9 (build 15.0.2+7, mixed mode, sharing)

It is sufficient e.g. to just modify regex, see attached patch
TagsNo tags attached.
abrt_hash
URL

Activities

vokac

vokac

2021-04-30 18:35

reporter  

javapackages-tools-java-functions.patch (543 bytes)   
--- java-functions.orig	2021-04-30 20:18:13.954618425 +0200
+++ java-functions	2021-04-30 20:18:47.189425626 +0200
@@ -310,7 +310,7 @@
     #   java full version "Blackdown-1.4.1-01"
     #   java version "1.5.0"
 
-    re='\([[:digit:]]\{1,\}\.[[:digit:]]\{1,\}\(\.[[:digit:]]\{1,\}\)*\)'
+    re='\([[:digit:]]\{1,\}\(\.[[:digit:]]\{1,\}\)*\)'
     for option in -fullversion -version; do
         # Yuck, "grep -o" would be cleaner, but requires GNU grep >= 2.5.
         # This could be improved/simplified if sed had non-greedy matching.

Issue History

Date Modified Username Field Change
2021-04-30 18:35 vokac New Issue
2021-04-30 18:35 vokac File Added: javapackages-tools-java-functions.patch