I installed Eclipse IDE today on my Ubuntu Linux and then installed JavaFX using \'Install New Software\' and when I created a javafx project, I got the following error in M
Here's how to set it up on Ubuntu Linux with Maven:
1) Install OpenJFX package, check where did it put the files.
sudo apt install openjfx
dpkg-query -L openjfx
You might end up with version for JDK 11. In which case, either follow with installing a new OpenJDK, or set a version of OpenJFX for JDK 8.
2) Put it to your Maven project as a system
-scoped dependency.
Note this is the lazy and not-so-nice way. Properly, you should install the jars like this:
dpkg-query -L openjfx | grep -E '.jar$' | xargs -l -I{} \ mvn install:install-file -Dfile="{}" -DgroupId=javafx \ -DartifactId=$(echo $JAR | tr '.' '-') -Dversion=1.0 -Dpackaging=jar
And then use it as a normal
compile-scoped
dependency.
UTF-8
1.8
1.8
/usr/share/openjfx/lib
javafx
javafx-base
1.0
system
${javafx.dir}/javafx.base.jar
javafx
javafx-controls
1.0
system
${javafx.dir}/javafx.controls.jar
javafx
javafx-fxml
1.0
system
${javafx.dir}/javafx.fxml.jar
javafx
javafx-graphics
1.0
system
${javafx.dir}/javafx.graphics.jar
javafx
javafx-media
1.0
system
${javafx.dir}/javafx.media.jar
javafx
javafx-swing
1.0
system
${javafx.dir}/javafx.swing.jar
javafx
javafx-web
1.0
system
${javafx.dir}/javafx.web.jar