Skip to content

Commit 09c3f81

Browse files
committed
change: use Java 17 as the build target, require Java 17+ for execution
1 parent d3cba66 commit 09c3f81

File tree

11 files changed

+17
-159
lines changed

11 files changed

+17
-159
lines changed

.github/workflows/matrix.js

-21
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ matrix.addAxis({
2626
name: 'java_version',
2727
// Strings allow versions like 18-ea
2828
values: [
29-
'8',
30-
'11',
3129
'17',
3230
'21',
3331
eaJava,
@@ -80,12 +78,6 @@ matrix.setNamePattern(['java_version', 'java_distribution', 'hash', 'os', 'tz',
8078

8179
// Semeru uses OpenJ9 jit which has no option for making hash codes the same
8280
matrix.exclude({java_distribution: {value: 'semeru'}, hash: {value: 'same'}});
83-
// Semeru 8 fails when Semeru 17 is on the PATH (we use 17 for build)
84-
matrix.exclude({java_distribution: {value: 'semeru'}, java_version: '8'});
85-
// Microsoft Java has no distribution for 8
86-
matrix.exclude({java_distribution: {value: 'microsoft'}, java_version: '8'});
87-
// Oracle JDK is only supported for JDK 17 and later
88-
matrix.exclude({java_distribution: {value: 'oracle'}, java_version: ['8', '11']});
8981
// Ignore builds with JAVA EA for now, see https://github.com/apache/jmeter/issues/6114
9082
matrix.exclude({java_version: eaJava})
9183
matrix.imply({java_version: eaJava}, {java_distribution: {value: 'oracle'}})
@@ -97,10 +89,6 @@ matrix.generateRow({hash: {value: 'same'}});
9789
matrix.generateRow({os: 'windows-latest'});
9890
// TODO: un-comment when xvfb will be possible
9991
// matrix.generateRow({os: 'ubuntu-latest'});
100-
// Ensure there will be at least one job with Java 8
101-
matrix.generateRow({java_version: "8"});
102-
// Ensure there will be at least one job with Java 11
103-
matrix.generateRow({java_version: "11"});
10492
// Ensure there will be at least one job with Java 17
10593
matrix.generateRow({java_version: "17"});
10694
// Ensure there will be at least one job with Java 21
@@ -119,15 +107,6 @@ include.forEach(v => {
119107
`-Duser.country=${v.locale.country}`,
120108
`-Duser.language=${v.locale.language}`,
121109
];
122-
if (v.hash.value === 'same' && v.java_version <= 8) {
123-
// processSiteXslt fails with VerifyError when running with Java 8 and the same hashcode
124-
// Skip the task in that case
125-
//java.lang.VerifyError: (class: website_style, method: issue_separator signature: (Lcom/sun/org/apache/xala...)
126-
// Illegal target of jump or branch
127-
gradleArgs.push('-x :src:dist:processSiteXslt');
128-
// javadoc tool seems take too much CPU when there are many hash collisions
129-
gradleArgs.push('-x :src:dist:javadocAggregate');
130-
}
131110
v.extraGradleArgs = gradleArgs.join(' ');
132111
});
133112
include.forEach(v => {

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The steps to import the sources (based on Eclipse 2019-06) into Eclipse are as f
5454

5555
1. Install `Eclipse IDE for Java Developers`
5656
1. Install `Kotlin for Eclipse` plugin (JMeter code uses Java and Kotlin)
57-
1. Make sure you have a Java 8 compatible JDK configured in your workspace
57+
1. Make sure you have a Java 17 compatible JDK configured in your workspace
5858
1. Open `File->Import...`
5959
1. Select `Existing Gradle Project` and click `Next`
6060
1. Read `How to experience the best Gradle integration` and click `Next`

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ The following requirements exist for running Apache JMeter:
9292

9393
- Java Interpreter:
9494

95-
A fully compliant Java 8 Runtime Environment is required
95+
A fully compliant Java 17 Runtime Environment is required
9696
for Apache JMeter to execute. A JDK with `keytool` utility is better suited
9797
for Recording HTTPS websites.
9898

build-logic/build-parameters/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ buildParameters {
3838
description.set("Collect test coverage")
3939
}
4040
integer("targetJavaVersion") {
41-
defaultValue.set(8)
41+
defaultValue.set(17)
4242
mandatory.set(true)
4343
description.set("Java version for source and target compatibility")
4444
}

build-logic/jvm/src/main/kotlin/build-logic.java.gradle.kts

+3-8
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,9 @@ java {
4242
}
4343

4444
tasks.configureEach<JavaCompile> {
45-
// Use --release=8 for Java 10+ so the generated bytecode does not include methods introduced in Java 9+
46-
options.release.set(
47-
provider {
48-
buildParameters.targetJavaVersion.takeIf {
49-
javaCompiler.get().metadata.languageVersion.asInt() > 9
50-
}
51-
}
52-
)
45+
// Use --release=<targetJavaVersion> for javac so the generated bytecode does not include methods introduced in
46+
// next Java releases
47+
options.release.set(buildParameters.targetJavaVersion)
5348
}
5449

5550
tasks.configureEach<JavaExec> {

build-logic/jvm/src/main/kotlin/build-logic.kotlin.gradle.kts

+2-12
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,8 @@ tasks.configureEach<KotlinCompile> {
4848
apiVersion = "kotlin.api".v
4949
}
5050
freeCompilerArgs += "-Xjvm-default=all"
51-
val jdkRelease = buildParameters.targetJavaVersion.let {
52-
when {
53-
it < 9 -> "1.8"
54-
else -> it.toString()
55-
}
56-
}
57-
// jdk-release requires Java 9+
58-
buildParameters.buildJdkVersion
59-
.takeIf { it > 8 }
60-
?.let {
61-
freeCompilerArgs += "-Xjdk-release=$jdkRelease"
62-
}
51+
val jdkRelease = buildParameters.targetJavaVersion.toString()
52+
freeCompilerArgs += "-Xjdk-release=$jdkRelease"
6353
kotlinOptions.jvmTarget = jdkRelease
6454
}
6555
}

src/release/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ https://www.apache.org/dist/$tlpUrl/KEYS
6868
N.B.
6969
To create the distribution and test $tlp: "./gradlew build -Prelease -PskipSign".
7070
71-
$tlp $version requires Java 8 or later to run.
71+
$tlp $version requires Java 17 or later to run.
7272
7373
The artifacts were built with
7474
${"java.runtime.name".prop} ${"java.vendor".prop} (build ${"java.runtime.version".prop})

xdocs/building.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
Before you can compile JMeter, you will need a few things:
3131
<ul>
32-
<li>a Java 8 compatible JDK (Java Development Kit)</li>
32+
<li>a Java 17 compatible JDK (Java Development Kit)</li>
3333
<li>Optional: <a href="https://gradle.org/">Gradle</a> installation</li>
3434
<li>the JMeter sources as shown in the next section</li>
3535
</ul>

xdocs/changes.xml

+5-111
Original file line numberDiff line numberDiff line change
@@ -47,110 +47,23 @@ Earlier changes are detailed in the <a href="changes_history.html">History of Pr
4747

4848
<br></br>
4949
<note>
50-
JMeter 5.6.x requires Java 8 or later for execution (Java 17 or later recommended).
51-
<br></br>
52-
<b>The next major release would require Java 17 or later.</b>
50+
JMeter 6.x requires Java 17 or later for execution (Java 21 is recommended).
5351
</note>
5452

55-
<!-- =================== 5.6.3 =================== -->
53+
<!-- =================== 6.0.0 =================== -->
5654

57-
<h1>Version 5.6.3 </h1>
55+
<h1>Version 6.0.0 </h1>
5856
<p>
5957
Summary
6058
</p>
6159
<ul>
6260
<li><a href="#Bug fixes">Bug fixes</a></li>
6361
</ul>
6462

65-
<ch_section>Improvements</ch_section>
63+
<ch_section>Changes</ch_section>
6664
<h3>General</h3>
6765
<ul>
68-
<li><pr>6199</pr>Enable use of <code>${...}</code> expressions for <code>TransactionController</code> "generate parent sample", and "include timers" checkboxes</li>
69-
<li><pr>6199</pr>Enable use of <code>${...}</code> expressions for <code>ThreadGroupGui</code> "scheduler" checkbox</li>
70-
<li><pr>6199</pr>Enable use of <code>${...}</code> expressions for <code>HTTP Request</code> "retrieve embedded resources", "download resources concurrently", and "store as MD5" checkboxes</li>
71-
</ul>
72-
73-
<!-- =================== Bug fixes =================== -->
74-
75-
<ch_section>Bug fixes</ch_section>
76-
77-
<h3>General</h3>
78-
<ul>
79-
<li><issue>6043</issue><pr>6044</pr>JMeter 5.6 shows 0 as a min response time in summary report</li>
80-
<li>Restored binary API compatibility with pre-5.6.2: restore public methods to non-static as they were before 5.6.2 <code>JavaSamplerContext.getJMeterVariables</code>,
81-
<code>JavaSamplerContext.getJMeterProperties</code>, <code>BoundaryExtractor.extractAll</code>,
82-
<code>AuthManager.setupCredentials</code>, <code>HttpRequestHdr.getMultipartConfig</code>, (regression since 5.6.2)</li>
83-
<li><issue>6165</issue><pr>6192</pr>The Constant Throughput Timer is throwing a NullPointerException when using variables (vars.get) in "Target Throughput"-field</li>
84-
<li><issue>6162</issue>The Constant Timer is throwing a NullPointerException when using variables (vars.get) in "delay"-field</li>
85-
<li><pr>6193</pr>Log errors happening while JMeter starts the test (previously, errors from TestStateListener.testStarted were not logged)</li>
86-
<li><pr>6216</pr>Pass JDBCSampler.maxRows to Statement.setMaxRows so the driver does not fetch extra rows from the database</li>
87-
</ul>
88-
89-
<ch_section>Non-functional changes</ch_section>
90-
<ul>
91-
<li><pr>6166</pr>Use Gradle to 8.5 for building JMeter</li>
92-
<li>Require Java 17 for building JMeter </li>
93-
<li><pr>6199</pr>Improved API for programmatic test plan creation, see default implementations of <code>createTestElement</code>, <code>modifyTestElement</code>,
94-
and new <code>makeTestElement</code> and <code>assignDefaultValues</code> methods in <code>JMeterGUIComponent</code>.
95-
<code>AbstractJMeterGuiComponent.configureTestElement</code> is now discouraged</li>
96-
<li><pr>6212</pr>Refactor: migrate existing Groovy tests to Kotlin, remove Groovy compiler from the build pipeline</li>
97-
<li><pr>6214</pr>Refactor JUnit 3 and JUnit 4 tests to JUnit 5, remove JUnit 4 test dependency</li>
98-
</ul>
99-
100-
<ch_section>Dependency upgrades</ch_section>
101-
<ul>
102-
<li>Update com.fasterxml.jackson.core:jackson-annotations to 2.16.1 (was 2.15.2)</li>
103-
<li>Update com.fasterxml.jackson.core:jackson-core to 2.16.1 (was 2.15.2)</li>
104-
<li>Update com.fasterxml.jackson.core:jackson-databind to 2.16.1 (was 2.15.2)</li>
105-
<li>Update com.fifesoft:rsyntaxtextarea to 3.3.4 (was 3.3.3)</li>
106-
<li>Update com.google.errorprone:error_prone_annotations to 2.24.0 (was 2.20.0)</li>
107-
<li>Update commons-codec:commons-codec to 1.16.0 (was 1.15)</li>
108-
<li>Update commons-io:commons-io to 2.15.1 (was 2.12.0)</li>
109-
<li>Update commons-logging:commons-logging to 1.3.0 (was 1.2)</li>
110-
<li>Update commons-net:commons-net to 3.9.0 (was 3.10.0)</li>
111-
<li>Update io.burt:jmespath-core to 0.6.0 (was 0.5.1)</li>
112-
<li>Update io.burt:jmespath-jackson to 0.6.0 (was 0.5.1)</li>
113-
<li>Update net.minidev:accessors-smart to 2.5.0 (was 2.4.11)</li>
114-
<li>Update net.minidev:json-smart to 2.5.0 (was 2.4.11)</li>
115-
<li>Update net.sf.saxon:Saxon-HE to 11.6 (was 11.5)</li>
116-
<li>Update org.apache.commons:commons-lang3 to 3.14.0 (was 3.12.0)</li>
117-
<li>Update org.apache.commons:commons-pool2 to 2.12.0 (was 2.11.1)</li>
118-
<li>Update org.apache.commons:commons-text to 1.11.0 (was 1.10.0)</li>
119-
<li>Update org.apache.httpcomponents.client5:httpclient5 to 5.3 (was 5.2.1)</li>
120-
<li>Update org.apache.httpcomponents.core5:httpcore5-h2 to 5.2.4 (was 5.2)</li>
121-
<li>Update org.apache.httpcomponents.core5:httpcore5 to 5.2.4 (was 5.2)</li>
122-
<li>Update org.apache.logging.log4j:log4j-1.2-api to 2.22.1 (was 2.20.0)</li>
123-
<li>Update org.apache.logging.log4j:log4j-api to 2.22.1 (was 2.20.0)</li>
124-
<li>Update org.apache.logging.log4j:log4j-core to 2.22.1 (was 2.20.0)</li>
125-
<li>Update org.apache.logging.log4j:log4j-slf4j-impl to 2.22.1 (was 2.20.0)</li>
126-
<li>Update org.apache.xmlgraphics:xmlgraphics-commons to 2.9 (was 2.8)</li>
127-
<li>Update org.checkerframework:checker-qual to 3.42.0 (was 3.35.0)</li>
128-
<li>Update org.codehaus.groovy:groovy-datetime to 3.0.20 (was 3.0.17)</li>
129-
<li>Update org.codehaus.groovy:groovy-dateutil to 3.0.20 (was 3.0.17)</li>
130-
<li>Update org.codehaus.groovy:groovy-jmx to 3.0.20 (was 3.0.17)</li>
131-
<li>Update org.codehaus.groovy:groovy-json to 3.0.20 (was 3.0.17)</li>
132-
<li>Update org.codehaus.groovy:groovy-jsr223 to 3.0.20 (was 3.0.17)</li>
133-
<li>Update org.codehaus.groovy:groovy-sql to 3.0.20 (was 3.0.17)</li>
134-
<li>Update org.codehaus.groovy:groovy-templates to 3.0.20 (was 3.0.17)</li>
135-
<li>Update org.codehaus.groovy:groovy-xml to 3.0.20 (was 3.0.17)</li>
136-
<li>Update org.codehaus.groovy:groovy to 3.0.20 (was 3.0.17)</li>
137-
<li>Remove org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22</li>
138-
<li>Update org.jetbrains.kotlin:kotlin-stdlib-jdk7 to 1.9.10 (was 1.8.22)</li>
139-
<li>Update org.jetbrains.kotlin:kotlin-stdlib-jdk8 to 1.9.10 (was 1.8.22)</li>
140-
<li>Update org.jetbrains.kotlin:kotlin-stdlib to 1.9.22 (was 1.8.22)</li>
141-
<li>Update org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm to 1.7.3 (was 1.7.1)</li>
142-
<li>Update org.jetbrains.kotlinx:kotlinx-coroutines-swing to 1.7.3 (was 1.7.1)</li>
143-
<li>Update org.jetbrains.lets-plot:base-portable-jvm to 4.1.0 (was 3.2.0)</li>
144-
<li>Update org.jetbrains.lets-plot:lets-plot-common to 4.1.0 (was 3.2.0)</li>
145-
<li>Update org.jetbrains.lets-plot:lets-plot-kotlin-jvm to 4.5.0 (was 4.4.1)</li>
146-
<li>Update org.jetbrains.lets-plot:plot-common-portable-jvm to 4.1.0 (was 3.2.0)</li>
147-
<li>Update org.jetbrains:annotations to 24.1.0 (was 24.0.1)</li>
148-
<li>Update org.jsoup:jsoup to 1.17.1 (was 1.16.1)</li>
149-
<li>Update org.mongodb:mongo-java-driver to 2.14.3 (was 2.11.3)</li>
150-
<li>Update org.neo4j.driver:neo4j-java-driver to 4.4.13 (was 4.4.11)</li>
151-
<li>Update org.ow2.asm:asm to 9.6 (was 9.5)</li>
152-
<li>Update org.xmlresolver:xmlresolver to 5.2.1 (was 4.6.4)</li>
153-
<li>Update org.xmlresolver:xmlresolver:data to 5.2.1 (was 4.6.4)</li>
66+
<li><pr>6220</pr> Require Java 17 or later for running JMeter</li>
15467
</ul>
15568

15669
<!-- =================== Thanks =================== -->
@@ -203,25 +116,6 @@ This property is in this file:
203116
See <bugzilla>56357</bugzilla> for details.
204117
</li>
205118

206-
<li>
207-
Under Mac OSX Aggregate Graph will show wrong values due to mirroring effect on numbers.
208-
This is due to a known Java bug, see Bug <a href="https://bugs.openjdk.java.net/browse/JDK-8065373" >JDK-8065373</a>
209-
The fix is to use JDK8_u45 or later.
210-
</li>
211-
212-
<li>
213-
View Results Tree may fail to display some HTML code under HTML renderer, see <bugzilla>54586</bugzilla>.
214-
This is due to a known Java bug which fails to parse "<code>px</code>" units in row/col attributes.
215-
See Bug <a href="https://bugs.openjdk.java.net/browse/JDK-8031109" >JDK-8031109</a>
216-
The fix is to use JDK9 b65 or later.
217-
</li>
218-
219-
<li>
220-
JTable selection with keyboard (<keycombo><keysym>SHIFT</keysym><keysym>up/down</keysym></keycombo>) is totally unusable with Java 7 on Mac OSX.
221-
This is due to a known Java bug <a href="https://bugs.openjdk.java.net/browse/JDK-8025126" >JDK-8025126</a>
222-
The fix is to use JDK 8 b132 or later.
223-
</li>
224-
225119
<li>
226120
Since Java 11 the JavaScript implementation <a href="https://openjdk.java.net/jeps/335">Nashorn has been deprecated</a>.
227121
Java will emit the following deprecation warnings, if you are using JavaScript based on Nashorn.

xdocs/download_jmeter.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<a href="https://www.apache.org/dist/jmeter/KEYS">KEYS</a>
7979
</p>
8080
</section>
81-
<section name="Apache JMeter &release; (Requires Java 8+)">
81+
<section name="Apache JMeter &release; (Requires Java 17+)">
8282
<subsection name="Binaries" anchor="binaries">
8383
<table>
8484
<tr>

xdocs/usermanual/get-started.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ over your Test Plans.</p>
115115
<p>JMeter requires that your computing environment meets some minimum requirements.</p>
116116

117117
<subsection name="&sect-num;.1.1 Java Version" anchor="java_versions">
118-
<note>JMeter is compatible with Java 8 or higher.
118+
<note>JMeter is compatible with Java 17 or higher.
119119
We highly advise you to install latest minor version of your major version for security and performance reasons.
120120
</note>
121121
<p>Because JMeter uses only standard Java APIs, please do not file bug reports if your JRE fails to run

0 commit comments

Comments
 (0)