Raspberry Pi Users: Switch to Oracle JDK8 for instant speed boost

Quick tip: I had to reinstall everything last weekend and found it was all a bit laggy on a fresh install. Upgrading from the default Open Java 1.7 to official Oracle Java 1.8 made everything blindingly fast. So if your OpenHAB seems a little slow, type “java -version” to see what you’re running, and if it’s the Open Java 1.7 still, backup your SD card and upgrade immediately.

sudo apt-get install oracle-java8-jdk

Once you’re installed, you need to switch which java your system uses with:
update-alternatives --config java
(and select whichever is the official Oracle one by pressing that number)

Restart and get insta-boost!

Does anyone know of a downside to using the official Java instead of Open Java?

1 Like

Oracle Java is the officially recommend JRE for running OH (both 1.x and 2). This is the first I’ve heard of a speed boost (not surprised) but there are some bugs in OpenJDK which sometimes causes people problems.

That’s great to hear that the switch had that effect on your system. There are no downsides of switching. Oracle Java is closed source and OpenJDK open source - that’s why it favored by most distributions. Basically both packages should do the same job. It’s however as you can see not always like this… Actually this has been discovered before and is part of the documentation http://docs.openhab.org/installation/prereqs.html - you are invited to enhance this article (or just post a suggestion here)