Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is JavaFX is not included in OpenJDK 8 on Ubuntu Wily (15.10)?

I've downloaded OpenJDK 8 today via sudo apt-get install openjdk-8-jdk and it seems like JavaFX is not included in it.

> java -version openjdk version "1.8.0_66-internal" OpenJDK Runtime Environment (build 1.8.0_66-internal-b17) OpenJDK Server VM (build 25.66-b17, mixed mode) 

I've installed E(fx)clipse in latest Eclipse (Eclipse Mars) too, but I'm still getting message javafx couldn't be resolved.

like image 253
Nikola Stojaković Avatar asked Dec 12 '15 19:12

Nikola Stojaković


People also ask

Is JavaFX included in OpenJDK 8?

JavaFX is missing in OpenJDK 8 Distributions #577.

Why is JavaFX not included in JDK?

JavaFX was removed from JDK since JDK 11. Since JDK 9, java is modular. JavaFX was split into modules. Hence there is no longer a single jfxrt.

Is JavaFX available in OpenJDK?

JavaFX is part of OpenJDK The JavaFX project itself is open source and is part of the OpenJDK project.

Is JavaFX included in Java 8?

JavaFX for Oracle Java 8 is not a separate installation. JavaFX is included in Oracle JDK 8 running on OS X, Linux x86 and Windows.


1 Answers

According to the packages list in Ubuntu Wily Xenial Bionic there is a package named openjfx. This should be a candidate for what you're looking for:

JavaFX/OpenJFX 8 - Rich client application platform for Java

You can install it via:

sudo apt-get install openjfx 

It provides the following JAR files to the OpenJDK installation on Ubuntu systems:

/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfxswt.jar /usr/lib/jvm/java-8-openjdk-amd64/lib/ant-javafx.jar /usr/lib/jvm/java-8-openjdk-amd64/lib/javafx-mx.jar 

If you want to have sources available, for example for debugging, you can additionally install:

sudo apt-get install openjfx-source 
like image 167
MWiesner Avatar answered Sep 28 '22 06:09

MWiesner