Here is how we do it (using RPI 4B):
1. We download JDK 11 32 bit for Linux ARM (in tar.gz format) from:
Download Liberica JDK, supported OpenJDK builds. Open source Java 8, 11 and more for Linux, Windows, macOS.
bell-sw.com
Looks like this (scroll down - make sure to get 32 bit version):
View attachment 115474
2. Make sure to copy the downloaded tar.gz file to the /home/pi folder.
3. Now use the commands below (this example being for 11.0.10 - change as needed):
From the terminal:
• sudo mkdir /usr/java
• sudo cp bellsoft-jdk11.0.10+9-linux-arm32-vfp-hflt-full.tar.gz /usr/java
• cd /usr/java
• sudo tar -xf ~/bellsoft-jdk11.0.10+9-linux-arm32-vfp-hflt-full.tar.gz
• sudo update-alternatives --install /usr/bin/java java /usr/java/jdk-11.0.10-full/bin/java 1000
• sudo update-alternatives --install /usr/bin/javac javac /usr/java/jdk-11.0.10-full/bin/javac 1000
To check java is installed type following (from the terminal)
• java -version
• javac -version
JFX ships with Bellsoft java version 11 so DONT install open jfx.
Reboot system.
Hope this helps.