Bug 61529 - Migration to Java 9
Summary: Migration to Java 9
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.3
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: NeedsReleaseNote
: 61679 61721 61772 62035 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-17 14:32 UTC by Philippe Mouawad
Modified: 2018-01-30 22:22 UTC (History)
5 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2017-09-17 14:32:23 UTC
This migration will follow JMeter 3.3 release.
Comment 1 Philippe Mouawad 2017-09-17 15:25:28 UTC
https://github.com/apache/jmeter/pull/308
Comment 2 Philippe Mouawad 2017-10-03 20:25:11 UTC
Author: pmouawad
Date: Tue Oct  3 20:24:21 2017
New Revision: 1811029

URL: http://svn.apache.org/viewvc?rev=1811029&view=rev
Log:
Bug 61529 - Migration to Java 9
This closes #308
Bugzilla Id: 61529

Modified:
    jmeter/trunk/bin/jmeter
    jmeter/trunk/build.xml
    jmeter/trunk/src/components/org/apache/jmeter/control/ModuleController.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/ApplyNamingConvention.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeModel.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
    jmeter/trunk/xdocs/changes.xml
Comment 3 Philippe Mouawad 2017-10-23 13:48:41 UTC
Author: pmouawad
Date: Mon Oct 23 13:13:25 2017
New Revision: 1813017

URL: http://svn.apache.org/viewvc?rev=1813017&view=rev
Log:
Bug 61529 - Migration to Java 9
Handle --add-modules for Java 9
Bugzilla Id: 61529

Modified:
    jmeter/trunk/bin/jmeter
Comment 4 Philippe Mouawad 2017-10-27 14:34:52 UTC
*** Bug 61679 has been marked as a duplicate of this bug. ***
Comment 5 Antonio Gomes Rodrigues 2017-10-27 16:44:01 UTC
Fix detection problem of the OS in bin/jmeter


https://bz.apache.org/bugzilla/show_bug.cgi?id=61667
Comment 6 Antonio Gomes Rodrigues 2017-10-29 17:08:27 UTC
In Windows 10 with Java 9 we have

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Downloads/apache-jmeter-r1813639/apache-jmeter-r1813639/lib/groovy-all-2.4.12.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release


>java -version
openjdk version "9"
OpenJDK Runtime Environment (build 9+181)
OpenJDK 64-Bit Server VM (build 9+181, mixed mode)
Comment 7 Antonio Gomes Rodrigues 2017-10-29 21:34:53 UTC
New Revision: 1813710

URL: http://svn.apache.org/viewvc?rev=1813710&view=rev
Log:
Bug 61529 - Migration to Java 9 : jmeter.bat Windows file Java 9 detection

Modified:
    jmeter/trunk/bin/jmeter.bat

The "WARNING: An illegal reflective access operation has occurred" is still present

Antonio
Comment 8 Antonio Gomes Rodrigues 2017-10-29 22:35:16 UTC
New Revision: 1813711

URL: http://svn.apache.org/viewvc?rev=1813711&view=rev
Log:
Bug 61529 - Migration to Java 9 : New syntax for GC log

Modified:
    jmeter/trunk/bin/jmeter
    jmeter/trunk/bin/jmeter.bat
Comment 9 Philippe Mouawad 2017-11-03 20:06:31 UTC
It seems we're hitting some bugs in xstream with Java 9 and field accessibility:

- https://issues.apache.org/jira/browse/MWAR-405
- https://github.com/x-stream/xstream/issues/74

But I don't have the reproducer yet as it was not caught by our test suite nor manual tests.
Comment 10 Felix Schumacher 2017-11-04 18:27:26 UTC
Author: fschumacher
Date: Sat Nov  4 18:25:57 2017
New Revision: 1814314

URL: http://svn.apache.org/viewvc?rev=1814314&view=rev
Log:
If JAVA_HOME is not set, but JRE_HOME is set or guessed, set JAVA_HOME to JRE_HOME before resolving the java executable

Followup to r1811029
Bugzilla Id: 61529

Modified:
    jmeter/trunk/bin/jmeter
Comment 11 Felix Schumacher 2017-11-04 19:36:04 UTC
Author: fschumacher
Date: Sat Nov  4 19:32:46 2017
New Revision: 1814316

URL: http://svn.apache.org/viewvc?rev=1814316&view=rev
Log:
Try to detect the version of java by removing a potentially existing string "1." from
the start of the version string and all characters beginning with the first non digit.

This will convert a java 8 version string like "1.8.144_91" to "8" and a java 9 version
string like "9-ea" to "9"

Followup to r1813017
Bugzilla Id: 61529

Modified:
    jmeter/trunk/bin/jmeter
Comment 12 Felix Schumacher 2017-11-05 10:06:23 UTC
Date: Sun Nov  5 09:59:48 2017
New Revision: 1814345

URL: http://svn.apache.org/viewvc?rev=1814345&view=rev
Log:
Use the same binary for version detection as the one we start.

Bugzilla Id: 61529

Modified:
    jmeter/trunk/bin/jmeter
Comment 13 Philippe Mouawad 2017-11-08 21:13:48 UTC
*** Bug 61721 has been marked as a duplicate of this bug. ***
Comment 14 Felix Schumacher 2017-11-17 16:02:03 UTC
*** Bug 61772 has been marked as a duplicate of this bug. ***
Comment 15 Philippe Mouawad 2018-01-23 12:36:38 UTC
*** Bug 62035 has been marked as a duplicate of this bug. ***
Comment 16 Alan Bateman 2018-01-29 13:07:20 UTC
`--add-modules java.activation` will cease to work once the java.activation module has been dropped from Java SE and the JDK (details in JEP 320 [1]). The JavaBeans Activation Framework is published to Maven Central so no need to depend on the version included in the JDK.

[1] http://openjdk.java.net/jeps/320
Comment 17 Philippe Mouawad 2018-01-29 13:13:13 UTC
(In reply to Alan Bateman from comment #16)
> `--add-modules java.activation` will cease to work once the java.activation
> module has been dropped from Java SE and the JDK (details in JEP 320 [1]).
> The JavaBeans Activation Framework is published to Maven Central so no need
> to depend on the version included in the JDK.
> 
> [1] http://openjdk.java.net/jeps/320

Hello Alan,
Thanks for your note.
In which version of Java SE/JDK will you be dropping it ?

Thank you
Comment 18 Alan Bateman 2018-01-30 11:10:36 UTC
The JEP is currently targeted to JDK 11 (look for the release field near the top). The JEP also has the Maven coordinates for the standalone version of JAF.
Comment 19 Philippe Mouawad 2018-01-30 22:20:01 UTC
Author: pmouawad
Date: Tue Jan 30 22:19:28 2018
New Revision: 1822712

URL: http://svn.apache.org/viewvc?rev=1822712&view=rev
Log:
Bug 61529 - Migration to Java 9
Add Java 9 options to avoid the warnings that will disturb our users.
Warnings are due to:
- https://github.com/bulenkov/Darcula/issues/41
- https://issues.apache.org/jira/browse/GROOVY-8339
Bugzilla Id: 61529

Modified:
    jmeter/trunk/bin/jmeter
    jmeter/trunk/bin/jmeter.bat
Comment 20 Philippe Mouawad 2018-01-30 22:22:04 UTC
(In reply to Alan Bateman from comment #18)
> The JEP is currently targeted to JDK 11 (look for the release field near the
> top). The JEP also has the Maven coordinates for the standalone version of
> JAF.

Opened Bug 62065 to track this in next releases.
Comment 21 The ASF infrastructure team 2022-09-24 20:38:10 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4493