B4J Question Liberica 11.0.11 full JDK install problem in Raspberry Pi 4b

hatzisn

Well-Known Member
Licensed User
Longtime User
Good evening everyone,

I tried to install Liberica 11 from their site (I also tried with 16) in Raspberry Pi 4b. I have read that the full JDK includes the JavaFX too to run UI applications in Raspberry Pi.
I failed big time. I followed the installation instructions as described here:


And here is what I get
B4X:
pi@raspberrypi:~/Downloads $ sudo apt install ./bellsoft-jdk16.0.1+9-linux-aarch64-full.deb

Reading package lists... Done
Building dependency tree     
Reading state information... Done
Note, selecting 'bellsoft-java16-full:arm64' instead of './bellsoft-jdk16.0.1+9-linux-aarch64-full.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
bellsoft-java16-full:arm64 : Depends: libasound2:arm64 but it is not installable
                              Depends: libc6:arm64 but it is not installable
                              Depends: libfreetype6:arm64 but it is not installable
                              Depends: libfontconfig1:arm64 but it is not installable
                              Depends: libx11-6:arm64 but it is not installable
                              Depends: libxau6:arm64 but it is not installable
                              Depends: libxcb1:arm64 but it is not installable
                              Depends: libxdmcp6:arm64 but it is not installable
                              Depends: libxext6:arm64 but it is not installable
                              Depends: libxi6:arm64 but it is not installable
                              Depends: libxrender1:arm64 but it is not installable
                              Depends: libxtst6:arm64 but it is not installable
                              Depends: zlib1g:arm64 but it is not installable
E: Unable to correct problems, you have held broken packages.

Why is this happening (changing what to install)?

Edit - the code is from when I tried to install the Java 16.0.1 full JDK but failed with the same errors
 
Last edited:

Bruce McGregor

Member
Licensed User
Here is how we do it (using RPI 4B):

1. We download JDK 11 32 bit for Linux ARM (in tar.gz format) from:


Looks like this (scroll down - make sure to get 32 bit version):

1624683849037.png


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.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
Thanks a lot. It works now. If someone has already installed the OpenJDK 11 they need also the following steps:
• sudo update-alternatives --config java (and then select the appropriate)
• sudo update-alternatives --config javac (and then select the appropriate)
 
Last edited:
Upvote 0
Top