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 https://github.com/bell-sw/Liberica/releases/download/11.0.2/bellsoft-jdk11.0.2-linux-arm32-vfp-hflt.deb
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
$ 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)
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:
Post a Comment