B4J Tutorial Install OpenJRE8 with OpenJFX on Ubuntu (Linux)

Discussion in 'B4J Tutorials' started by Alexander Stolte, Feb 26, 2019.

  1. Alexander Stolte

    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:
    Code:
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/scene/image/Image
    1. Download Java JRE 8 (in most cases you will need the Linux version):
    http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

    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.

    Tips:
    -replace the path with your path
    sudo tar -xvzf /home/admin/jre-8u201-linux-x64.tar.gz
     
    José J. Aguilar, inakigarm and Erel like this.
  2. xulihang

    xulihang Active Member Licensed User

    I think the oracle jre 8 should have javafx bundled and there is no need to install openjfx. The jre downloaded from oracle is different from openjre.
     
  3. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    may be, but does not work. I spent 3 days finding a simple solution and did a lot of testing.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice