B4J Tutorial Install OpenJRE8 with OpenJFX on Ubuntu (Linux)

Alexander Stolte

Well-Known Member
Licensed User
Hey, i had some trouble with OpenJRE8 and this was the solution.

This Tutorial help you, if you have for example this error:
java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/scene/image/Image
1. Download Java JRE 8 (in most cases you will need the Linux version):

2. type this in the terminal or console:
  • sudo mkdir /usr/lib/jvm
  • cd /usr/lib/jvm
  • sudo tar -xvzf /home/admin/jre-8u201-linux-x64.tar.gz
  • sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.8.0_201/bin/java" 0
  • sudo update-alternatives --set java /usr/lib/jvm/jre1.8.0_201/bin/java
  • update-alternatives --list java
  • java -version
  • sudo apt-get install openjfx
and now you can use OpenJRE8 with OpenJFX.

-replace the path with your path
sudo tar -xvzf /home/admin/jre-8u201-linux-x64.tar.gz