Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rest-dev] Drop Minimum Java Requirement to Java 17



On Wed, Dec 13, 2023 at 9:01 AM Arjan Tijms via rest-dev <rest-dev@xxxxxxxxxxx> wrote:
Hi,

On Wed, 13 Dec 2023 at 17:31, James Perkins via rest-dev <rest-dev@xxxxxxxxxxx> wrote:
Especially given there is no requirement to be on Java 21 as only Jakarta Concurrency is requiring it.

This came up in the platform call, and there actually is at least one very good reason to require a Java version that's only a year old instead of one that's almost 3 years old (or even older), even if the API would not strictly require it.

The reason is that if Jakarta REST 4.0 requires JDK 21, I can be sure that all of my code written for Jakarta REST 4.0 can use JDK 21 features. Every Jakarta REST 4.0 implementation will be able to run it, by definition.

We can always test with the latest JDK. People still use libraries compiled to Java 8, probably even Java 6, in their environments. I don't see why this would be an issue.
 

However, if Jakarta REST 4.0 only required JDK 17, or even 11, I would need to take into account that some implementation out there might indeed only support JDK 17 or JDK 11, and in my code targeting Jakarta REST 4.0 I would not feel as free to make use of JDK 21 features. I know not everyone writes either libraries or universal shrink wrapped apps, but it's something to take into account.

Since the platform TCK will require Java 21 to be Jakarta EE 11 compliant you'd have to test on Java SE 21.

I would think most vendors, I know Red Hat feels this way, want to work on all newer versions of Java. At least LTS versions. For RESTEasy we already run the TCK with Java SE 21. However, we have users that either don't want to use Java 21 or can't use Java 21. It would be great if users would just move to the latest LTS, however that just doesn't happen.

New language features can still be used with an MR JAR. I don't know what Jakarata REST would use that would require Java SE 21. However, given it's a highly used specification even outside of Jakarta EE, it seems like it should allow better adoption. I truly think using Java SE 17 is the way to do that. 
 

Kind regards,
Arjan Tijms


 
 

-Markus

 

 

Von: James Perkins [mailto:jperkins@xxxxxxxxxx]
Gesendet: Mittwoch, 13. Dezember 2023 17:09
An: Markus Karg
Cc: Jakarta Rest project developer discussions
Betreff: Re: [rest-dev] Drop Minimum Java Requirement to Java 17

 

 

 

On Tue, Dec 12, 2023 at 11:45 PM Markus Karg <markus@xxxxxxxxxxxxxxx> wrote:

JAX-RS 4 will be a breaking change, so consumers need to modify their source code anyways. Hence I do not see why it should be a problem to also step up from 17 to 21 for those projects. So I'm still -1 for falling back to 17. I am +-0 for a multi-platform jar containing binaries compiled for both, 17 and 21, as a compromise. Note that the TCK MUST be compiled exactly to 21 anyways, still (https://jakartaee.github.io/platform/jakartaee11/JakartaEE11ReleasePlan), and that the same document says that downstreams MUST be compiled to a higher JDK level if needed, not vice versa.

 

While that document does indicate the TCK must be Java SE 21, I don't see why the platform specification should mandate what level a spec uses as long as it works with the minimum required version for the platform. 

 

"If a component Specification is planning a Major or Minor version update for Jakarta EE 11, then the recommendation would be to recompile and distribute the specification’s APIs at lowest required of Java SE 17 and Java SE 21.


Note: A component specification may be required to recompile to a higher Java SE level than it actually use depending on the specifications it depends on."

That seems to indicate an API compiling to Java SE 17 is perfectly acceptable.

I'm definitely not opposed to requiring Java 21 for compiling and using a release of 17. I think MR JAR's are great and very useful. Currently the API doesn't use anything specific to Java 21, but that doesn't mean we can't in the future.

 

In a lot of environments/workplaces it's not simple to just upgrade a Java version. For some I'm sure even getting to Java SE 17 will be a challenge. In the ideal world people just upgrade, but from experience I've never seen that happen. They will stick with older specs over upgrading the Java version.

 

-Markus

 

Von: James Perkins [mailto:jperkins@xxxxxxxxxx]
Gesendet: Mittwoch, 13. Dezember 2023 01:01
An: Markus Karg
Cc: Jakarta Rest project developer discussions
Betreff: Re: [rest-dev] Drop Minimum Java Requirement to Java 17

 

From what I've heard from co-workers that have been to conferences, users are not moving to Java 21 any time soon. Most are moving on Java 11 and may be moving to Java 17. I have no hard evidence on this, but I think we can attest to how slow companies are to pick up new Java versions :)

 

I would also argue that Quarkus and MicroProfile are pretty heavily used as well and those are not Jakarta EE so to speak. Granted, they don't have to upgrade to Jakarta REST 4.0, however that is my argument about adoption.

 

Note that currently in the API we use nothing Java 21 specific.

 

On Tue, Dec 12, 2023 at 3:10 PM Markus Karg <markus@xxxxxxxxxxxxxxx> wrote:

I do not see that 21-LTS is a real showstopper for SeBootstrap adoption since there is no good reason to stick with older LTS releases (are there known incompatibilities?).

Most JAX-RS applications are running in the Jakarta EE environment anyways.

We should not limit ourself due to edge cases without a real need, but instead follow the SE release cycle as closely as we can, so we have full choice to use latest language features and API if we want to.

Hence I am -1 for fallingback to 17.

-Markus

 

 

Von: rest-dev [mailto:rest-dev-bounces@xxxxxxxxxxx] Im Auftrag von James Perkins via rest-dev
Gesendet: Dienstag, 12. Dezember 2023 22:27
An: rest-dev
Cc: James Perkins
Betreff: [rest-dev] Drop Minimum Java Requirement to Java 17

 

Hello All,

In PR 1168 [1] we updated the minimum JDK level to 21. With the exception of concurrency, the Jakarta REST spec is the only other individual spec not having a minimum requirement of Java 17. When the vote was made for Jakarta REST 4.0, the level then was Java 17. I'm not sure if upgrading should have technically required a revote or not, but just pointing that out.

 

I realize the platform specs themselves are going to require Java 21. However, there is no requirement that any other specs need to require Java 21. IMO requiring Java 21 is going to limit adoption of the Jakarta REST spec outside of Jakarta EE 11. There are other projects, even SeBootstrap, that use the Jakarta REST spec outside of a Jakarta EE container. A big one consumer are the MicroProfile specs and implementations.

 

Could we consider dropping the minimum back to Java 17?

 

[1]: https://github.com/jakartaee/rest/pull/1168

 

--

James R. Perkins

JBoss by Red Hat


 

--

James R. Perkins

JBoss by Red Hat


 

--

James R. Perkins

JBoss by Red Hat



--
James R. Perkins
JBoss by Red Hat
_______________________________________________
rest-dev mailing list
rest-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org
_______________________________________________
rest-dev mailing list
rest-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org


--
James R. Perkins
JBoss by Red Hat

Back to the top