saif_iot
Posts: 1
Joined: Thu Aug 20, 2020 4:58 pm

How to install OpenJDK 8 and OpenJFX 8

Thu Aug 20, 2020 6:22 pm

Hello,

I'm trying to use STM32 board programmer on Raspberry Pi 4, I know this tool is written in Java 8 using OpenJDK8 & OpenJFX 8.

Code: Select all

sudo apt install openjdk-8-jdk

java --version

openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01)
OpenJDK Client VM (build 25.212-b01, mixed mode)
Nice, but how to install OpenJFX 8 ? the tool can't run without OpenJFX 8 :/

Code: Select all

./STM32MP_SigningTool_CLI
-bash: ./STM32_Programmer_CLI: cannot execute binary file: Exec format error

knute
Posts: 808
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas

Re: How to install OpenJDK 8 and OpenJFX 8

Thu Aug 20, 2020 9:21 pm

OpenJDK8 does not include OpenJFX. You need to install it separately and the only OpenJFX in the repository now is 11. Java code written for 8 should work fine on 11. You can go to the Oracle site and get the old Java8 that used to come with a Pi and install that, it may have JavaFX in it.

If it was me I would go to bell-sw.com and get the full version 11 for ARM that includes Liberica which is Bell Software's version of JavaFX. It works great and doesn't require any of the crazy command line options to get it to work.

That said, none of the new Javas are going to work on a Pi 0 or 1 (and I think some of the early 2s). Java8 has long since passed its end of life.

Heater
Posts: 19132
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to install OpenJDK 8 and OpenJFX 8

Fri Aug 21, 2020 8:11 am

I have never needed any Java to program STM32 boards.

I suggest saving yourself from Java, there are better ways:
https://medium.com/@olayiwolaayinde/pro ... a6ee7a8d8d
https://www.instructables.com/id/Start- ... -on-Linux/
Slava Ukrayini.

Return to “Java”