### Liberica JDK

Liberica JDK Installation Status 20180419.
Information
As taken from here ( https://www.bell-sw.com/java-for-raspberry-pi.html ) Liberica is a 100% open-source Java 10 implementation for Raspberry Pi..
It is built from OpenJDK which BellSoft contributes.
Tested the Liberica JDK DEB package (Linux ARMv7&8 32 Bit HardFloat) on a Raspberry Pi 3B+ with Stretch (Linux raspberrypi 4.14.30-v7+ #1102 SMP Mon Mar 26 16:45:49 BST 2018 armv7l).
Installation
Login as user pi.
// Create a folder to store the downloads and for the test applications.
$mkdir /home/pi/java
// Set the java folder as default
$cd /home/pi/java
// Download the Liberica JDK10 package from BellSoft
$wget https://github.com/bell-sw/Liberica/releases/download/10/bellsoft-jdk10-linux-arm32-vfp-hflt.deb
Logging information snippet ...
-2018-04-18 09:33:42-- https://github.com/bell-sw/Liberica/releases/download/10/bellsoft-jdk10-linux-arm32-vfp-hflt.deb
Saving to: ‘bellsoft-jdk10-linux-arm32-vfp-hflt.deb’
bellsoft-jdk10-linu 100%[===================>] 209.58M 752KB/s in 4m 48s
2018-04-18 09:38:31 (745 KB/s) - ‘bellsoft-jdk10-linux-arm32-vfp-hflt.deb’ saved [219758630/219758630]
// Install the Liberica JDK10 package
$sudo apt install ./bellsoft-jdk10-linux-arm32-vfp-hflt.deb
Logging information snippet ...
// Check the installed java and javac versions
$ java -version
java version "1.8.0_162"
$ javac -version
javac 1.8.0_162
// Set the right javac version
$sudo update-alternatives --config javac
There are 4 choices for the alternative javac (providing /usr/bin/javac).
Selection Path Priority Status
-----------------------------------------------------------
0 /usr/lib/jvm/jdk-10-bellsoft-arm32-vfp-hflt/bin/javac 1902 auto mode
1 /opt/jdk1.8.0_161/bin/javac 1 manual mode
• 2 /opt/jdk1.8.0_162/bin/javac 1 manual mode
3 /usr/lib/jvm/jdk-10-bellsoft-arm32-vfp-hflt/bin/javac 1902 manual mode
4 /usr/lib/jvm/jdk-7-oracle-arm-vfp-hflt/bin/javac 317 manual mode
Press to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/lib/jvm/jdk-10-bellsoft-arm32-vfp-hflt/bin/javac to provide /usr/bin/javac (javac) in manual mode
// Set the right java version
$sudo update-alternatives --config java
There are 4 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
-----------------------------------------------------------
0 /usr/lib/jvm/jdk-10-bellsoft-arm32-vfp-hflt/bin/java 1902 auto mode
1 /opt/jdk1.8.0_161/bin/java 1 manual mode
• 2 /opt/jdk1.8.0_162/bin/java 1 manual mode
3 /usr/lib/jvm/jdk-10-bellsoft-arm32-vfp-hflt/bin/java 1902 manual mode
4 /usr/lib/jvm/jdk-7-oracle-arm-vfp-hflt/jre/bin/java 317 manual mode
Press to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/lib/jvm/jdk-10-bellsoft-arm32-vfp-hflt/bin/java to provide /usr/bin/java (java) in manual mode
// Check the java and javac versions again = should be the BellSoft versions
$javac -version
javac 10-BellSoft
$java -version
openjdk version "10-BellSoft" 2018-03-20
OpenJDK Runtime Environment (build 10-BellSoft+0)
OpenJDK Server VM (build 10-BellSoft+0, mixed mode)
pi@raspberrypi:~/java $
Installation Folder
The JDK is installed in folder: /usr/lib/jvm/jdk-10-bellsoft-arm32-vfp-hflt
Recommend to read the file readme.txt. The file release contains release version and module information.

Changed: 2018-05-08 09:51, Category: Raspberry Pi UI Liberica, File: T6C287M2160.htm, ID: 2160