openHAB 4.0 Milestone Builds

Dear community,

You had to wait for a long while, but I am now happy to announce that we have the first milestone build of openHAB 4.0 ready for download!

There has been a major technical change by moving from Java11 to Java17, which involved upgrading many libraries to very recent versions. This is all successfully done and the snapshot builds were already tested by many of you, which helped on identifying and fixing regressions.
The positive effect is that we are now on a very future-proof technical foundation again and that all contributors can make use of modern language features that Java17 brings.
The downside is that we have to ask you to update your JVM to Java17, if you haven’t done so yet.

Another effect of Java17 is that it does not include the Nashorn Javascript engine anymore, since the GraalVM is the more modern approach in the Java ecosystem.

Please note therefore a couple of changes with regards to Javascript support in openHAB:

  • The application/javascript MIME type has moved from NashornJS to GraalJS due to the removal of NashornJS in Java 14. All UI-based JavaScript scripts including Blocklies are broken now. To make them work again:
    • Migrate your Blocklies (see Rules Blockly | openHAB)
    • Install the JavaScript Nashorn add-on and change the MIME type of your old application/javascript scripts to application/javascript;version=ECMAScript-5.1. The UI has a picker for the MIME type of existing scripts inside the „Script Details“ menu inside the script editor. (Or rewrite them for GraalJS, where the openhab-js library will ease your life.)
  • The JS transformation no longer exists and the SCRIPT transformation should be used instead. Inline JS scripts in transformations and JS profiles are still work in progress.

Besides these things, there was a lot of work on new features and other fixes - see the extensive list on the official release notes.

I have created a new discussion topic for any questions and issues you might have around this first - and all future - openHAB 4.0 Milestone build.