I have centos 7.1. And I installed openjdk8 and openjdk-devel8. However, when I tried to compile in netbeans my jfx application I get package javafx.* does not exist. After some investigation I see that there is no jfxrt.jar in jdk. Besides

[root@localhost ext]# yum provides jfxrt.jar
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.astpage.ru
 * epel: epel.besthosting.ua
 * extras: mirror.astpage.ru
 * nux-dextop: mirror.li.nux.ro
 * updates: mirror.astpage.ru
adobe-linux-x86_64/filelists             |  619 B  00:00:00     
base/7/x86_64/filelists_db               | 6.0 MB  00:00:01     
epel/x86_64/filelists_db                 | 6.3 MB  00:00:01     
extras/7/x86_64/filelists_db             |  87 kB  00:00:00     
nux-dextop/x86_64/filelists_db           | 2.3 MB  00:00:02     
updates/7/x86_64/filelists_db            | 836 kB  00:00:00     
No matches found
[root@localhost ext]# 

So my question - how to add jfx library to openjdk 8 on centos 7?


2 Answers 2


OpenJDK 8 for CentOS doesn't have JavaFX included by default...
You can do one of the following:

Switch to Oracle JDK:
1. remove all open jdks & jre's until when you type "java" in a shell it doesn't recognize 2. download from oracle the .rpm and install it via yum localinstall


Manually copy the JavaFX jars from another computer that has them
I never tested this myself, but some people mentioned it might work


Make a custom build of OpenJDK and include JavaFX

Hoping this was helpful...


download jdk-8u91-linux-x64.tar.gz archive of oracle jdk from http://www.oracle.com/technetwork/java/javase/downloads/index.html, unpack and set PATH and JAVA_HOME to it. Just keep in mind that you have to watch security updates on your own.

You must log in to answer this question.

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