I use Ubuntu 20.04 and i have 3 java versions installed:
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-14-openjdk-amd64/bin/java 1411 auto mode
1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-14-openjdk-amd64/bin/java 1411 manual mode
* 3 /usr/lib/jvm/java-14-oracle/bin/java 1091 manual mode
4 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
Press <enter> to keep the current choice[*], or type selection number:
$ java -version
java version "14.0.1" 2020-04-14
Java(TM) SE Runtime Environment (build 14.0.1+7)
Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
When I try to run the jar program through the terminal java -jar ***.jar
, I still get the error
Error: JavaFX runtime components are missing, and are required to run this application.
And even when I change the version of Java, the error is still the same.
sudo apt-get install openjfx
and sudo apt-get install openjfx-source
- It doesn't work for me.
I do not understand how to install Java FX on Ubuntu 20.04. Do you have any advice for me? Please help.