1
  • OS: Ubuntu 18.10
  • IDE: NetBeans 8.2
  • OpenJDK: 8
  • openjfx

Hello,
I tried to install openjfx on my machine with apt-get install openjfx. Installation was successful but I cannot create JavaFX applications or if I download an exercise from my school (a template) that tries to import java.javafx.* there is an error that package javafx doesn't exist.

If I try to open a new JavaFX project I get error;

Failed to automatically set-up a JavaFX Platform. Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab, enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime. Note: JavaFX SDK can be downloaded from JavaFX website.

I tried to follow this but English isn't my native language and I really couldn't do it. I tried to set up folders etc, tried to copy jre-files to different folders but nothing works.

I tried to watch some tutorials also and usually they had jfxrt.jar file which my installation doesn't have.

user@user:~$ dpkg -L openjfx

/. 

/usr 

/usr/share 

/usr/share/doc 

/usr/share/doc/openjfx 

/usr/share/doc/openjfx/TODO.Debian 

/usr/share/doc/openjfx/changelog.Debian.gz 

/usr/share/doc/openjfx/copyright 

/usr/share/openjfx 

/usr/share/openjfx/lib 

/usr/share/openjfx/lib/javafx.properties 

/usr/share/openjfx/lib/javafx.base.jar 

/usr/share/openjfx/lib/javafx.controls.jar 

/usr/share/openjfx/lib/javafx.fxml.jar 

/usr/share/openjfx/lib/javafx.graphics.jar 

/usr/share/openjfx/lib/javafx.media.jar 

/usr/share/openjfx/lib/javafx.swing.jar 

/usr/share/openjfx/lib/javafx.web.jar 
1
  • What part of the steps in the suggested instructions did you have trouble with? Where did you get stuck?
    – timotree
    Commented Mar 31, 2019 at 19:58

1 Answer 1

1

This may be an issue with the OpenJFX version in the Ubuntu repositories. They currently ship only v11 which is incompatible with OpenJDK 8. You can install OpenJFX v8 explicitly:

sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2

Since you're on 18.10, you will have to add the bionic repositories

sudo echo "deb http://de.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list

(Learned and expanded from https://bugs.launchpad.net/ubuntu/+source/openjfx/+bug/1799946).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .