OpenHAB and future JDK versions. When?

No problem in my specific case. However, wouldn’t it be better to jump onto the Java 11 train and cut the lines those parts not compatible? E.g. by setting a deadline?

Thanks for the info Scott. Now this makes sense to me. How could one help during the reintegration process?

I don’t think there’s much to do during the reintegration, unless you want to jump in to help. There are a lot of bindings pending review/approval… you may be able to help with those during the framework freeze/thaw cycle.

It may be better to ask in the other thread though! :wink:

It’s a bit pointless to build an openHAB release without all bindings that use serial devices just because openHAB doesn’t work well with Java 11 on Windows (nrjavaserial#131). Let’s hope this show stopper is fixed in time for openHAB 2.5.0. :slight_smile:

Amazon looks like they are taking over the torch from Oracle. They will be providing a supported versions of OpenJDK 8 for a few years: https://aws.amazon.com/corretto/

1 Like

Hi,

I just saw this thread, and thought to share my info on this. I’m OpenHAB user, and I work at Red Hat, open source company which many of you likely know. This Oracle Java question is big discussion now at our customers too, and I’d like to comfort there is likely no need for any panic (likely, due as mentioned not all features work on it). OpenJDK will remain supported also by Red Hat, and as we have upstream first policy, it will be maintained open in upstream. So there is no hurry to get away from it. Of course, such Oracle dependencies should be dropped away. OpenJDK11 support is also coming up.

Here’s a bit more info into the subject: https://developers.redhat.com/oracle-java-support-openjdk/

I’m not here to advertise the company, but also as a user of OpenHAB, just to offer my view that there will be open source OpenJDK for future too.

BR,
ikkeT

Well, as I see it there will be more and more commercial players popping up, now that Oracle dropped public support for Java SE 8. Question is: Which one can we trust (Amazon? seriously?) and which one will provide “free” support (RedHat? Probably only for
their Enterprise customers using their Enterprise Linux version).

This is pretty much the old dilemma of Java since the very beginning: It was never really Open Source. From the software engineering perspective, I really like OpenHAB. However, I take information security quiet serious even at home. And together with the previous
experience with Oracle, I will not base my smart home and security appliance on a platform driven by companies like Zulu, Amazon or similar offering “free” support, without knowing about what they get for it.

I know this isn’t OpenHAB specific (we face the very same problem at work). This is Java (Oracle) specfic. And this will last as long Oracle still claim their ownership.

I think you confuse open source and support. Open source is development method, where as support is what happens after the development release. OpenJDK is open source upstream. And yes, companies do sell support for it with different terms. Source is free open source, but support varies, can be free or paid. And have different terms. But upstream first policy keeps it evolving openly.

I see OpenJDK is very core piece of e.g. RH middleware offering, and will have good lifecycle and roadmaps. There are heavy weight users for that.

1 Like

Let’s see. Was on JFocus19 in Stockholm, and from Oracle this is how I understand it will be.

Java is developed in/by OpenJDK, which is not Oracle. It has a release schedule of 6 month, and that is not negotiable. And yes, Oracle are and probably will still be the main contributor. There will be Long Time Supported versions though, but Oracle will not be supporting OpenJDK LTS, others will do that, like Red Hat. Oracle will support their version of OpenJDK, and give support to their paying customers. As others also will do.

Oracle JDK are and will be based on OpenJDK, there will be no differences as it was before OpenJDK 9. But if you want to have Oracle JDK, you have to pay for their support.

So no, it will not be a big issue, just use OpenJDK and/or others compilations, like those mentioned here in this thread, like Oracle, RedHat etc.

OpenJDK will have long time supported versions, which OpenJDK 11 will be one.

So the choice is the blue or red pill, as they said. Go on the rolling 6 month schedule, and have the latest. OR go for the LTS, which will be at least supported to then next LTS and probably longer.

OpenJDK are based on modules, and THIS is the big thing. The rest of the changes is just nice to have additions.
But modules ARE changes, so there have and will be removed methods, classes, packages and modules. Some notable is java.EE, which is Java Enterprise Edition, and web server support. You can get those from other support though, like today with many different Java Servlet Containers.

Modules are basically a collection of packages, where you tell which other modules you uses and need.
So, the main thing is Modules. And so OpenHAB should transfer to use modules, even if other libraries have not done the transfer yet. Yes, there are ways of temporarily ignore those module warnings, but they WILL stop to work, but for now we get warnings. So, warnings now will be fatal later.

There are gradual ways of transfers to use modules, but it need to be done.

Modules have the nice property that you can collect modules that your program uses, and create a Java RE that only have those needed modules. Which will make a smaller RT and a Java that uses less memory in distribution and when running. Yes, you can make a RT which IS your program. And that will probably be the preferably way of distributing programs.
That is with modules it will be like linking in GCC and other program languages.

1 Like

BTW, heads up to Quarkus: https://developers.redhat.com/blog/2019/03/07/quarkus-next-generation-kubernetes-native-java-framework/

This one path Java development will be taking. Check out the boot time :slight_smile:

They are using GraalVM. GraalVM is able to fully compile java bytecode ahead of time (AOT), so they basically start x86 binaries. Of course that leads to very good start up times. But I have read that GraalVM does not work well with OSGi which is used by openHAB.

And by speaking of OSGi. That existed way before Java9 jigsaw aka modules. So openHAB by itself is very modular actually. And it is a simple compile switch that converts an OSGi bundle into a java9 module (almost).

OSGi is a runtime modular system though. The advantage is that any binding can be thrown in at any time and the system will adapt. So we cannot simply link a static runtime and have a smaller memory footprint, because the next user will require exactly the method that you have removed. But openHAB already requires that you only use methods from the Compact Profile 2.

1 Like

Well, my concern when it comes to home automation is not that much “speed” but security and trust. So to what extent does this VM provide something to my OpenHAB installation? Nothing as far as I can see. It’s surely relevant in some other domains.

Just my 2ct.

By the way, what about the next release of Java? 12, 13, 14, …

openHAB is not using any deprecated JDK methods, so new versions should be fine. Java 8->9 was actually the big challenge with the module system, but it currently looks like OH 2.5 will be java 11 compatible.

1 Like

The currently don’t support arm 32, bud I did put in a feature request for it https://github.com/corretto/corretto-8/issues/60.

New java features are actually neat and help to get the language out of the 90s.
I don’t see a reason to stick to Java 8.

1 Like

Me not either. Nice to maybe receive new Java features. But it’s also up to the respective developer to adopt those. I mean, not even all “new” Java 8 features are used in the current framework (or even bindings)…

Java 8 is the last version of Java that works with 32 bit processors.

Are there any 32bit only platforms left? On x86 64bit brings more registers, more simd instructions, a wider memory bus. I do not see a reason to stick to 32bit. Do you?

Raspberry Pi (1,2,3) usually works in 32 bit mode. I guess this is the most common openHAB platform. AFAIK Raspbian (the base of openHABian) is only available as 32 bit.

2 Likes