“Error: package javafx.geometry does not exist” solution/troubleshooting
Hi guys,
If you faced “Error: package javafx.geometry does not exist” error and if you couldn’t find any solution, you’re right there :))
I spent hours on this problem. I am writing this article so that no one does not spend hours with this problem.
The default openjfx package on Ubuntu 18.04 is not compatible with OpenJDK 8. You may use the older version of the openjfx package. Please note that it’s not a fully secure solution because you won’t get updates for the package.
Firstly, make sure java-8 using in your system.
After that check java version.
If everything is normal, you can skip the next step. Make sure below jdk/jre’s install normally.
sudo apt-get install openjdk-8-jdk-headless
sudo apt-get install openjdk-8-jre
After that, install openjx for openjdk-8
sudo apt install \
openjfx=8u161-b12-1ubuntu2 \
libopenjfx-java=8u161-b12-1ubuntu2 \
libopenjfx-jni=8u161-b12-1ubuntu2
When you installed openjx for openjdk-8, apt-mark hold openjfx for the new updates.
sudo apt-mark hold \
openjfx \
libopenjfx-java \
libopenjfx-jni
Ref: https://askubuntu.com/questions/1137891/how-to-install-run-java-8-and-javafx-on-ubuntu-18-04