Files
doris/regression-test/java-udf-src
Dongyang Li 805b746add [fix](regression) use JDK 17 for Java UDF builds (#65888)
## What changed

- make `run-regression-test.sh` select and validate JDK 17 before
invoking Maven
- prefer a valid `JAVA_HOME` or `JDK_17`, with Linux and macOS discovery
fallbacks
- build the regression framework and Java UDF case jar with the same JDK
17
- compile `java-udf-src` with `maven.compiler.release=17`

## Why

The regression build depended on the caller to prepare `JAVA_HOME`, and
newer branches also switched to JDK 8 only for the Java UDF module. This
split ownership between CI and the Doris build script and could produce
incomplete case artifacts when the framework required JDK 17.

Keeping Java selection in `run-regression-test.sh` makes local and CI
builds follow the same contract and removes the Java 8-only UDF build
path.

## Validation

- `bash -n run-regression-test.sh`
- `git diff --check`
- ran `./run-regression-test.sh --clean` while the incoming `JAVA_HOME`
pointed to JDK 22; the script selected JDK 17 and Maven reported Java 17
- built `regression-test/java-udf-src` with JDK 17 successfully
- verified `Echo$EchoInt` has class major version 61 and the expected
UDF classes are present in the assembled jar
2026-07-23 20:11:47 +08:00
..