Switch to Java 17

Currently OpenEMS is built on Java SE 11, which was released on 25th September 2018 and will be maintained till at least 2024 or longer. The current Long-Term-Support version of Java is version 17, which was released on 14th September 2021.
β†’ Java version history - Wikipedia

Only recently the Eclipse Adoptium project finished their efforts to also provide Java Runtime Environment (JRE) builds for Java 17 (and newer) after taking over from the AdoptOpenJDK project.
β†’ Issue on Eclipse Adoptium: https://github.com/adoptium/installer/issues/430
β†’ Eclipse Adoptium Debian Packages: JFrog

With this requirement now being fulfilled, we (as FENECON) plan to switch to Java 17 as soon as possible to allow us to use latest Java language features. Java 17 brings plenty of improvements in code readability and safety.

Our plan is, to:

  1. Switch the project to Java 17 in this PR by the end of February 2023 (after the OpenEMS Hackathon Anmeldung OpenEMS Hackathon 1/2023 – OpenEMS):
  1. Add individual PRs to refactor existing code base to Java 17 features - either feature by feature or bundle by bundle, according to our Contribution/Coding Guidelines: Coding Guidelines :: Open Energy Management System

What are Community opinions on this step?
Do you see any blockers we should consider?



We are already using Java 17 with the Kunbus Revolution Pi and with the Consolinno Leaflet. So I see no problems here. In general I very much like the idea of switching to Java 17. We compile OpenEMS still with Java 11 so I don’t know of any blockers. To get some practical experience we will switch our development system to Java 17 soon. That gives us enough time to raise up any possible problems.