Hi, I'm going to merge "gradle toolchains" soon: see https://github.com/apache/jmeter/pull/5989.
It would enable us to separate "JDK for building, JDK for testing, and target(bytecode) JDK version". The code would still build Java 1.8-compatible bytecode, however, it would use Java 17 for build and test by default. The important difference is that the code will no longer use "default JAVA_HOME" for building JMeter. On the contrary, it would attempt to find a matching Java 17 locally, and if missing, it would download one. See the description at https://docs.gradle.org/current/userguide/toolchains.html#sec:provisioning Auto-download could be disabled by setting org.gradle.java.installations.auto-download=false property. The following properties select JDKs for building and testing (see ./gradlew parameters): targetJavaVersion - Java version for source and target compatibility jdkBuildVersion - JDK version to use for building JMeter. If the value is 0, then the current Java is used. (see https://docs.gradle.org/8.0/userguide/toolchains.html#sec:consuming) jdkBuildVendor - JDK vendor to use building JMeter (see https://docs.gradle.org/8.0/userguide/toolchains.html#sec:vendors) jdkBuildImplementation - Vendor-specific virtual machine implementation to use building JMeter (see https://docs.gradle.org/8.0/userguide/toolchains.html#selecting_toolchains_by_virtual_machine_implementation ) jdkTestVersion - JDK version to use for testing JMeter. If the value is 0, then the current Java is used. (see https://docs.gradle.org/8.0/userguide/toolchains.html#sec:consuming) jdkTestVendor - JDK vendor to use testing JMeter (see https://docs.gradle.org/8.0/userguide/toolchains.html#sec:vendors) jdkTestImplementation - Vendor-specific virtual machine implementation to use testing JMeter (see https://docs.gradle.org/8.0/userguide/toolchains.html#selecting_toolchains_by_virtual_machine_implementation ) ---- The change enables us to test JMeter with newer JDKs. For example, in the above PR, I add testing with Java 21 early access, and the tests pass: JMeterVersion=5.6-SNAPSHOT b9a9a60 java.version=21-ea java.vm.name=OpenJDK 64-Bit Server VM java.vendor=Oracle Corporation java.home=C:\hostedtoolcache\windows\Java_jdkfile_jdk\21\x64 Vladimir