Make build compatible with JDK 24

Note: does not target JDK 24 in anyway, just makes sure the JDK 24 compiler and runtime can build / test the code.
6 files changed