Wednesday, January 23, 2019

Installing Liberica JDK 11.0.2 JDK on RaspberryPi 3+

A few days ago BellSoft announced that Liberica JDK 11.0.2 is available to download. I was so excited to install it on one of my RaspberryPi3+. Sadly there is still no 64-bit Debian version for RPI, so I have to stay with 32-bit one. 

How to install Java on RapsberryPi has been described in more details on our main Robo4J blog. I've followed exactly those steps only with the archive name changed.
$ sudo tar zxvf bellsoft-jdk11.0.2-linux-arm32-vfp-hflt.tar.gz -C /opt

Another way to install Liberica is to download deb package and install it by using apt-get. 
This is probably the better way as you get properly mapped all other JDK features, like JFR.

$ wget

and then: 

$ sudo apt-get install ./bellsoft-jdk11.0.2-linux-arm32-vfp-hflt.deb

As a next step I set a Java 11.0.2 as the default distribution by the following commands:
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java

Let's test the version by typing:
$ java -version

openjdk version "11.0.2-BellSoft" 2018-10-16
OpenJDK Runtime Environment (build 11.0.2-BellSoft+7)
OpenJDK Server VM (build 11.0.2-BellSoft+7, mixed mode)

Enjoy Coding!

No comments: