averbraeck / opentrafficsim

Open Source Multi-Level Traffic Simulator
BSD 3-Clause "New" or "Revised" License
28 stars 8 forks source link

Update Java version of OTS to Java-17 #110

Closed averbraeck closed 4 months ago

averbraeck commented 4 months ago

The current Java version is 11. This is an LTS version that will be supported for many more years, but new developments of Java such as records, new switch statements, new use of instanceof, vector API, etc. cannot be used in Java11. Furthermore, many new features are available in the default Java library. Later versions of Java are also typically faster than earlier ones.

In time, we might move to Java-21 and then update -- every time a year or so after the introduction of a new LTS version -- to the latest LTS. OTS is a development and research environment, and can therefore stay aligned with the latest LTS and the latest language developments in Java.

OTS version 1.7.5 will use Java-17 as the default compiler.

averbraeck commented 4 months ago

Libraries work, demos run fine, all unit tests pass.