Skip to content

Commit ce4eba2

Browse files
capistrantcecemei
authored andcommitted
Support jdk 21 officially (#18624)
* try zulu 21.0.8 * add java21 to supported runtimes in java docs * update the verify-java script to reflect no 11 support and 21 support
1 parent fbf8269 commit ce4eba2

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
strategy:
7979
fail-fast: false
8080
matrix:
81-
jdk: [ "21.0.4" ]
81+
jdk: [ "21" ]
8282
pattern: [ "C*", "H*,U*,V*", "N*,Q*,S*", "B*,O*,R*", "G*,J*,K*", "F*,L*,M*", "A*,D*,I*,X*,Y*,Z*", "E*,P*,T*,W*"]
8383
uses: ./.github/workflows/worker.yml
8484
with:

.github/workflows/static-checks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ jobs:
4141
strategy:
4242
fail-fast: false
4343
matrix:
44-
# Use JDK 21.0.4 to work around https://github.com/apache/druid/issues/17429
45-
java: [ '17', '21.0.4' ]
44+
java: [ '17', '21' ]
4645
runs-on: ubuntu-latest
4746
steps:
4847
- name: checkout branch

.github/workflows/unit-and-integration-tests-unified.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ jobs:
5656
strategy:
5757
fail-fast: false
5858
matrix:
59-
# Use JDK 21.0.4 to work around https://github.com/apache/druid/issues/17429
60-
jdk: [ '17', '21.0.4' ]
59+
jdk: [ '17', '21' ]
6160
runs-on: ubuntu-latest
6261
steps:
6362
- name: Checkout branch

docs/operations/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ a Java runtime for Druid.
2727

2828
## Selecting a Java runtime
2929

30-
Druid officially supports Java 17.
30+
Druid officially supports Java 17 and 21.
3131

3232
The project team recommends using an OpenJDK-based Java distribution. There are many free and actively-supported
3333
distributions available, including

examples/bin/verify-java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ sub fail_check {
2828
: "No Java runtime was detected on your system.";
2929

3030
print STDERR <<"EOT";
31-
Druid requires Java 11 or 17. $current_version_text
31+
Druid requires Java 17 or 21. $current_version_text
3232
3333
If you believe this check is in error, or you want to proceed with a potentially
3434
unsupported Java runtime, you can skip this check using an environment variable:
3535
3636
export DRUID_SKIP_JAVA_CHECK=1
3737
38-
Otherwise, install Java 11 or 17 in one of the following locations.
38+
Otherwise, install Java 17 or 21 in one of the following locations.
3939
4040
* DRUID_JAVA_HOME
4141
* JAVA_HOME
@@ -68,6 +68,6 @@ if ($?) {
6868
}
6969

7070
# If we know it won't work, die. Otherwise hope for the best.
71-
if ($java_version =~ /version \"((\d+)\.(\d+).*?)\"/ && $2 != 11 && $2 != 17) {
71+
if ($java_version =~ /version \"((\d+)\.(\d+).*?)\"/ && $2 != 17 && $2 != 21) {
7272
fail_check($1);
7373
}

0 commit comments

Comments
 (0)