What’s the final word on the preferred java run time for OH3 on openhabian? Reason for asking is I’ve just had an experience with 2 of the versions available via the openhabian-config utility.
Running OH3 current milestone/openhabian/rpi4 and after one of the updates this summer I started getting system failures due to thread count. I started monitoring thread count via the system info binding and sure enough the threadcount never decreased, only increased until failure in 1-2 days. Not sure what version of java runtime I was on at the time unfortunately but I believe it was zulu.
After messing with deleting/disabling bindings/rules for a bit to try to chase down the source I decided I would start with a fresh install on a fresh SD card and backup restore and sure enough the threadcount would actually increase, then decrease over time…problem solved.
Noticing that the default oob version installed with openhabian was openJDK I then updated to zulu 11 (which is what I think I had installed previously, but honestly not 100% sure) via the openhabian-config utility and to my surprise the problem was back…failures due to threadcount. So, switching back to openJDK via the openhabian-config utility again fixed the issue, threadcounts increase and decrease normally.
The online documentation seems to indicate that zulu is the default option, which it appears to not be so, and that zulu is the preferred runtime. Is there a definitive answer on this now in 2022? And if so is there any real reason to switch to zulu?
The preferred runtime is - surprise - what is installed by default, OpenJDK that is.
Where exactly did you see that ?
The reference I was seeing is in the prerequisites section of the installation overview page
I had someone tell me I had to use Zulu for an issue not related to what Java runtime I used, but I did not change my Java distribution.
It made no sense to me.
There is no longer any material difference between a TCK verified OpenJDK distribution and the Oracle JDK distribution. They are both built from the same source.
I use the OpenJDK 11 that is installed by Ubuntu apt. It works fine.
I’m a backend developer for my career(Spring Boot microservices), and I have never found any material difference between the various distributions I’ve used
Zulu(just tried it out for a project experiment)
Apple JDK (Apple internal use only. I was a contractor and Apple had some internal use only extensions, but if Plain Java, it was no different)
I would not worry about installing Zulu, it would not hurt anything, nor would it help anything.
There was a time a few years back now that Zulu was the only free JRE that would run well on an RPi. It had something to do with floating point operations IIRC and there was a nasty bug that would cause OH to crash on OpenJDK. The advice to use Zulu continued to be made long after the problems were fixed and the official recommended rntime has not been Zulu for time.
Maybe I don’t understand “rntime”, but Zulu is still the recommended Java to install according to the openHAB docs, as @pleedell pointed out.
Zulu is currently the recommended Java platform for openHAB.
OpenJDK may also be used, but it has some known limitations with openHAB and is not recommended.
(Irrelevant, of course, when talking about openhabian)
also on the download site zulu is recomended
Although related to the latest versions I regard recommendations for Zulu as outdated.
I thought that section of the docs changed some time ago. Neither openHABian not the Docker image use Zulu any more I think
The docs may need to be updated.
I’ve submitted a docs PR for that.
Someone else please do for the download site.