-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Java 17 compatibility #3976
Comments
Yeah! Jpackage - it is required modular java. |
I'm not sure if I should create an issue or write a comment here. Let me know if you need more details. What you were trying to doI was trying to run Gradle Wrapper What actually happenedIt failed, throwing an error. This is related to the change in Java API Method How to reproduce
Log details and game version
Computer details
To fix this issue, I temporarily downgraded to version 11 of OpenJDK. |
Hi @GIANTCRAB and thanks for the report! Your observation is right, the Java API changed between Java 11 and Java 14. This issue is meant to collect such issues so that we are able to upgrade to Java 14 (or newer) at some point.
|
I see, Java 13 added new methods, so when we pass null it's ambiguous whether that's a null ClassLoader or a null something-else. That's easy enough to make forward-compatible. It's the sort of thing that it seems like we might be able to catch categorically with one of the static analysis tools, but I haven't found anything in IntelliJ or SpotBugs that looks like "show me things that are incompatible with a future JDK," so I guess try-it-and-see will be how we find these. (I'm also surprised the code in question needs that method, but it wouldn't be the first time Java's file-handling stuff has surprised me.) |
I tried and failed to run with the current release candidate for JDK 15.
I wonder if that will be fixed by #3969? Either through something LWJGL 3 deliberately does differently, or just as a by-product of creating a newer build of the |
Thanks @keturn - interesting note 🤔 Will ping @DarkWeird here as an FYI - would indeed be interesting to see if LWJGL 3 will save us all. |
JDK 16 is now in Release Candidate phase, with less than four weeks until its scheduled General Availability release date. As far as we know, JDK 17 is still planned to arrive in September as the next release with long term support. Java 17 doesn't sound like such a far-off distant thing anymore! |
Java 16 / JDK 16 is out! jpackage, Records, Vector API and foreign memory access API are in incubation stages. At this point I'd be surprised if they're included as stable in 17. Those are interesting for gamedev so I would have liked to see them in this next Long-Term Service release, but not this time, I guess. Not much newsworthy on 17 yet. Some stuff for macs probably. We'll see what else shows up in the next few months. |
The first release candidate for Java 17 is out! The schedule targets August 19th for the final release candidate, Highlights from the release notes include:
|
hello,
Edit(skaldarnar): applied some markdown formatting to the original post for better readability |
I couldn't create a new world when testing the game on JDK 17 (same with JDK 19).
Lines 87 to 97 in 2dab9f6
It looks like you can't just reflect into Java internals anymore like you used to be able to. |
Yeah. It is. We should rewrite this part of code. In this place.. idk how get comparable task, because some internal logic wrapping task :( Maybe.. VarHandle with privateLookup in this future can help there... |
interesting. a couple of hints here as well, including VarHandle: |
Yeah. It is interesting feature. |
This main issue is this part: Newer Java versions are much more strict about how you can interact with modules. Private access via reflection is now almost completely forbidden. I agree that the right solution is indeed to not be accessing private implementation details at all. |
Being addressed with #5162 |
Edit: For those troubleshooting Java issues see also this page
Java 17 is the latest Long-Term Service release. Distributions are available from Adoptium as of September 22, 2021.
It is the first LTS release to have jpackage, the low-latency garbage collectors ZGC and Shenandoah, and maybe if we're lucky, the new foreign memory access API. Just to name a few things of potential interest to game development in addition to the other language niceties.
I thought it'd be good to have a tracking issue as a place to attract notes about problems that come up when people try using java 14, java 15, java 16, or java 17.
What you were trying to do
play (or develop) Terasology on the latest release of the JDK version ▁▁
What actually happened
As soon as I ▁(verb)▁ the ▁(noun)▁, Gooey Jr turned in to an ▁(animal)▁ and said: ▁▁▁▁▁▁▁▁
How to reproduce
Log details and game version
Computer details
The text was updated successfully, but these errors were encountered: