jMonkeyEngine / sdk

The jMonkeyEngine3 Software Development Kit based on Netbeans
BSD 3-Clause "New" or "Revised" License
315 stars 102 forks source link

Use JDK 21 #557

Closed tonihele closed 9 months ago

tonihele commented 11 months ago

Use JDK 21. It should be all possible to replace Java 17 with Java 21. We just need to be careful with the stuff actually now removed from Java, such as Thread.stop() (NavMeshGenerator.java).

NavMeshGenerator should maybe be rewritten to use NB provided thread pools anyway. Unfortunately whatever we do, we can't fix it completely. As changing stop to interrupt doesn't in this case do anything. The library doesn't support it as far as I can remember. Let's just say that is the library's problem.

pspeed42 commented 11 months ago

Since Java 1.1 or 1.2, the standing "joke" has been that the only safe way to murder a thread in Java is System.exit(). It's good that they are finally getting rid of Thread.stop()... code that was using it is already opening itself up to a raft of other problems.

tonihele commented 11 months ago

Here is related issue: https://github.com/jMonkeyEngine/sdk/issues/217. And one note that we should wait for jME 3.7. User projects with JDK 21 + pre 3.7 jME + LWJGL 3 will get a nasty warning to the console. It does work but better not have any extra scares for the user. Also https://github.com/jMonkeyEngine/sdk/issues/556 to get rid of any possible warnings. And NB 21.

Also x32 is sun setted? I'll create a ticket for that separately. We can remove it prior to this.