Skip to content
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 21 #1458

Open
ath0mas opened this issue Nov 4, 2023 · 5 comments
Open

Support for Java 21 #1458

ath0mas opened this issue Nov 4, 2023 · 5 comments

Comments

@ath0mas
Copy link

ath0mas commented Nov 4, 2023

Play Version

1.7.1

Operating System

All

JDK

21

Library Dependencies

.

Expected Behavior

Start and run fine with JDK 21.

And possibly update Java source doc to add Java 16, as it seems to be missing in the list while correct in the source code.

Actual Behavior

CompilationException "Incompatible Java version specified 21. Compatible versions are: 11, .., 19"

@bigclumsyoaf
Copy link

I forked a Java 21 branch for my own local testing:
https://github.com/targetis/play1/tree/java-21

I had to use Eclipse JDT Core Batch compiler Stable release 4.30M1, as 4.29 release doesn't have the VERSION_21 compiler option.

@ath0mas
Copy link
Author

ath0mas commented Nov 7, 2023

I am already able to do a basic debug run adding "21" as a String through a non-suspending breakpoint in my IDE, over an 1.7.1.
It is running pretty fine until now 😊

But better do proper updates and checks for the sources and dependencies for sure.

@cies
Copy link
Contributor

cies commented Mar 25, 2024

I had the experience with RePlay that all worked well until I upgraded beyond JDK 18. Hibernate 5.6 does not support it.

@osmanirosado
Copy link
Contributor

I updated the libraries ecj and jdt core to support JDK 21 compilation target. The number 21 was added to the list of compatible java versions. See this pull request. I was able to compile a switch expression with pattern matching.

@cies
Copy link
Contributor

cies commented Aug 15, 2024

The number 21 was added to the list of compatible java versions. See this pull request.

As long as Play1 prescribes Hibernate 5.6 it is technically not able to support beyond JDK18 (the upper limit of Hibernate 5.6). Not sure what will break, maybe the Hibernate devs/ issues tracker can elaborate on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants