diff --git a/.ci/build.sh b/.ci/build.sh
index 9016954290..ae7280b1b3 100755
--- a/.ci/build.sh
+++ b/.ci/build.sh
@@ -19,7 +19,7 @@ function build() {
pmd_ci_log_info "Install openjdk17 for integration tests and pmd-regression-tests"
pmd_ci_openjdk_install_adoptium 17
pmd_ci_log_info "Install openjdk21 for integration tests and pmd-regression-tests"
- pmd_ci_openjdk_install_adoptium "21-ea"
+ pmd_ci_openjdk_install_adoptium 21
PMD_MAVEN_EXTRA_OPTS=(
-Djava8.home="${HOME}/openjdk8"
-Djava17.home="${HOME}/openjdk17"
diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md
index a892d43832..d58ec15d53 100644
--- a/docs/pages/release_notes.md
+++ b/docs/pages/release_notes.md
@@ -49,6 +49,8 @@ The remaining section describes the complete release notes for 7.0.0.
#### Fixed issues
+* miscellaneous
+ * [#4699](https://github.com/pmd/pmd/pull/4699): Make PMD buildable with java 21
* java-codestyle
* [#2847](https://github.com/pmd/pmd/issues/2847): \[java] New Rule: Use Explicit Types
* [#4578](https://github.com/pmd/pmd/issues/4578): \[java] CommentDefaultAccessModifier comment needs to be before annotation if present
@@ -395,6 +397,7 @@ See also [Detailed Release Notes for PMD 7]({{ baseurl }}pmd_release_notes_pmd7.
* [#4460](https://github.com/pmd/pmd/pull/4460): Fix assembly-plugin warnings
* [#4582](https://github.com/pmd/pmd/issues/4582): \[dist] Download link broken
* [#4691](https://github.com/pmd/pmd/issues/4691): \[CVEs] Critical and High CEVs reported on PMD and PMD dependencies
+ * [#4699](https://github.com/pmd/pmd/pull/4699): Make PMD buildable with java 21
* ant
* [#4080](https://github.com/pmd/pmd/issues/4080): \[ant] Split off Ant integration into a new submodule
* core
diff --git a/pom.xml b/pom.xml
index 8245e6c548..ef6b71625d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -842,6 +842,23 @@
test
+
+
+ net.bytebuddy
+ byte-buddy
+ 1.14.9
+ test
+
+
+ net.bytebuddy
+ byte-buddy-agent
+ 1.14.9
+ test
+
+
com.github.tomakehurst
wiremock-jre8