This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.11 by this push:
     new a06e3a3e98 [KYUUBI #7289] Release requires Java 17 or 21
a06e3a3e98 is described below

commit a06e3a3e980746a98c5805dac4949a97e4b7cfa0
Author: Cheng Pan <[email protected]>
AuthorDate: Fri Dec 26 14:14:10 2025 +0800

    [KYUUBI #7289] Release requires Java 17 or 21
    
    ### Why are the changes needed?
    
    I hit an issue while preparing 1.11.0 RC0, which indicates I need to use a 
higher version of JDK for releasing.
    
    ```
    [INFO] --- antlr4:4.13.1:antlr4 (default)  kyuubi-extension-spark-4-0_2.13 
---
    [WARNING] Error injecting: org.antlr.mojo.antlr4.Antlr4Mojo
    java.lang.UnsupportedClassVersionError: org/antlr/v4/Tool has been compiled 
by a more recent version of the Java Runtime (class file version 55.0), this 
version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1 (Native Method)
        at java.lang.ClassLoader.defineClass (ClassLoader.java:756)
        at java.security.SecureClassLoader.defineClass 
(SecureClassLoader.java:142)
    ```
    
    In https://github.com/apache/kyuubi/pull/7144, we made it always use 
`-release:8` for `jdk9+`, so we still produce Java 8 compatible bytecode even 
using JDK 17, for all modules except Spark 4.0/4.1 extension modules.
    
    ### How was this patch tested?
    
    Will verify this in the next RC of 1.11.0
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #7289 from pan3793/release-java17.
    
    Closes #7289
    
    17e29bea0 [Cheng Pan] Release requires Java 17 or 21
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
    (cherry picked from commit eecdaaa4d78fef90d6acac9ab36cc1b9d3babe1c)
    Signed-off-by: Cheng Pan <[email protected]>
---
 build/release/release.sh          | 4 ++--
 docs/contributing/code/release.md | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/build/release/release.sh b/build/release/release.sh
index b80173fd52..31f96f458d 100755
--- a/build/release/release.sh
+++ b/build/release/release.sh
@@ -62,8 +62,8 @@ else
 fi
 
 JAVA_VERSION=$($JAVA -version 2>&1 | awk -F '"' '/version/ {print $2}')
-if [[ $JAVA_VERSION != 1.8.* ]]; then
-  echo "Unexpected Java version: $JAVA_VERSION. Java 8 is required for 
release."
+if [[ $JAVA_VERSION != 17.* && $JAVA_VERSION != 21.* ]]; then
+  echo "Unexpected Java version: $JAVA_VERSION. Java 17 or 21 is required for 
release."
   exit 1
 fi
 
diff --git a/docs/contributing/code/release.md 
b/docs/contributing/code/release.md
index 15dba4a7bd..82a9772b82 100644
--- a/docs/contributing/code/release.md
+++ b/docs/contributing/code/release.md
@@ -90,7 +90,7 @@ export ASF_PASSWORD=<your apache password>
 #### Java Home
 
 An available environment variable `JAVA_HOME`, you can do `echo $JAVA_HOME` to 
check it.
-Note that, the Java version should be 8.
+Note that, the Java 17 or 21 is required since 1.11.0, for earlier versions, 
it requires Java 8.
 
 #### Subversion
 

Reply via email to