-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Java 11 #3965
Comments
Relates to Guava#3272? Currently, we plan to continue supporting jdk 8 for some time. As I understand it, JAX-RS 3.0 will use Java API that is not in Java SE 8. Since then, Jersey (Possibly 3.x) would be able to get rid of Java SE 8/Unsafe dependency completely. This mostly depends on the community demand. I feel Java 11 is still not the mainstream, but with the Java 8 end-of-life the requirement of Java 8 compatibility will end. Vendors (IBM, RedHat) still plan to support their Java SE 8 for couple of years. Technically, we are able to use unsafe on JDK 8 and something else in JDK 11. This is a legal issue a bit, though. This would mean to alter repackaged classes that use Unsafe. That would mean to ask legal staff to validate the license whether it allows a change in the repackaged class source code. Likely, it would be ok. We may try to ask legal for their opinion once Jakarta EE is released and all the legal stuff related to the transition of Java EE to Jakarta EE is taken care of. Did you have any other concern regarding Java 11 in mind? |
@jansupol It seems that currently it's not possible to start a project build on Java 11 because the currently used
Upgrading the plugin to the latest |
@jansupol Main concerns I have are the uses of sun.misc.unsafe in the jersey internal libraries (looks like most come from guava).
Jersey still works under 11, however, I'm not sure how long that will continue to be the case. Would it be possible to maintain two branches for the duration of 8 support? A 3.X and 2.X? Future versions could take advantage of java 9's multi release jars ( https://www.javaworld.com/article/3184029/java-language/java-9s-other-new-enhancements-part-4-multi-release-jar-files.html ). Hopefully that will make this not such a problem with java 28. |
@cogman I actually opened #3979 some time ago to remove much of those old collection classes. It seems they only existed to provide BC with older Java versions, which are now unsupported because Jersey 2.26 and above require Java 8 to be compiled and run—so they could be simply replaced with the corresponding JDK classes instead. That leaves only the |
@mszabo-wikia I'll have to do a search, but I wonder if SubmissionPublisher is actually being used. Either way, it wouldn't be hard to implement it without the internal libraries (I've done this for my company), it just wouldn't be as fast (probably not an issue since we are talking about http communication anyways). I might propose a pull request. You could even, probably, do a class existence check where submission publisher is used to see if it exists, otherwise use the internal version. |
@cogman Looks like it's only being used in Jersey's SSE implementation (plus potentially in the projects of Jersey users who disregarded the fact it's in an Yeah, the class existence check would work for running the project, however it'd still cause an issue when building the project on Java 11. Currently (if one patches the maven plugin issue), compilation fails on |
If I understood correctly you want to take some code out of openjdk and package it into jersey. This is likely not ok as openjdk is GPL and jersey is EPL: https://www.eclipse.org/legal/eplfaq.php#GPLCOMPATIBLE
Jdk8 is EoL January 2019, so the time to sort this out is asap, imo. Or make a classifier for java8 vs. java11. This way android and slow moving orgs can remain on the oldy mouldy java while the world moves on. |
We have JDK 11 on top of our priority list, for 2.29 release. You are correct, Oracle JDK 8 EoL was announced to be January. Unless I am too much mistaken OpenJDK has EoL in a couple of years. You are also correct that GPL is an issue with EPL. The situation is more complicated with GPLwCPE that JDK 8 is using, but that's possibly not our concern, The classes we might need to update if any were part JEP 266 and originally available under CC0 license before putting to JDK. |
@jansupol that's great news – is there a planned release date for 2.29? Also I tried to see if there are any "help wanted" issues for 2.29. But I cannot find anything, not even a milestone. |
Right, we are focusing on releasing 2.28 right now, which is in progress currently. Once done, we start working on 2.29. As soon as all the legal matters between the Eclipse Foundation and Oracle are settled, we can perform new releases. I'd love to see 2.29 in April. Regarding "help wanted", we certainly welcome any help with the open issues Jersey has. Regarding JDK 11, we would welcome any PR that fixes build of Jersey there, even partially, per modules. |
@jansupol For JDK 11 there's already PR #3979, which fixes an issue with |
Fellas, I am curious what is the status of Java 11 as of right now? Fully supported, or still considered "experimental" of sorts? |
Hi, right now Jersey 2.31 should be working flawlessly on JDK 8, 11, 12, 13, 14, and 15. If you have a reason to believe otherwise, please file a bug. Please see our wiki for releases and JDK compatibility. I think this can be closed. |
The current settings were a deliberate decision in DCS-239, due to upstream issues with TLSv1.3. We did not explicitly disable any of the older versions so far, since they are enabled in Java by default. Since new Jersey versions work fine with JDK 11, we can enable 1.3 again, and disable deprecated/old versions, see eclipse-ee4j/jersey#3965 for more info. Tested with Chrome, Firefox and cURL. Request: DCS-1291 Change-Id: I8a5518b87dd2cebf6a33ea6789255a95c0361038
Is there any release planned for jersey-common and jersey-guava that supports Java 11? If yes, when is it planned to release?
The text was updated successfully, but these errors were encountered: