Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - AngelSpirit

Pages: [1]
1
Modding / Java 17 Changes
« on: March 20, 2024, 12:05:25 AM »
Basically, if you weren't already aware, Alex announced in a recent blog post that Starsector will be moving to Java 17. Considering we've been running on Java 7 up until now, that means the game will be abruptly jumping an entire decade forward in terms of language.

Naturally, a lot's changed, so during my own search on what all is new and shiny, I've gathered a list of links that may be of use to fellow modders keen on exploring Java 17's new language features.

This isn't intended to be a comprehensive Java 17 guide (you can find plenty of those on the internet), but rather just a high-level list of stuff that might be interesting to fellow Starsector modders. Feel free to point out stuff I've missed that you think might be important.

I've included links to the official JEPs for the newer features (they come with some nice examples), and older Oracle tutorials for some others.


Deprecations & Removals
  • A bunch of internal packages (mostly sun.* and com.sun.* stuff) are no longer accessible.
    • Java 11+ includes tools to automatically identify use of removed APIs, you can find a guide on using them here.
       
  • Several garbage-collection related VM parameters got removed in Java 9, and again in Java 14.
       
    • This isn't technically part of modding, but I'm still listing it here since some people currently use custom vmparams.
       
  • Using the new keyword with primitive classes, e.g. new Integer() is deprecated as of Java 9.
    • The recommended replacement is Integer.valueOf().
       
  • Finalization (the finalize() method) is considered deprecated and will eventually be removed.


Language Enhancements

Pages: [1]