How To Solve FAQs for JavaFX 11 or higher 'JavaFX deployment library not found in active JDK'

preview_player
Показать описание
In this tutorial, I will show you how to solve frequently asked questions (FAQs) when you run a JavaFX 11 or higher project using Apache NetBeans IDE 12, Scene Builder 11 on Windows 10 x64.

With the release of Java Development Kit (JDK) 11 in 2018, Oracle has made JavaFX part of the OpenJDK under the OpenJFX project. It means that Oracle JDK 11 is no longer comes with JavaFX 11. To continue use JavaFX, we may choose to use current long-term version (JDK 8) through March 2025 or use OpenJFX 11 or higher after integrated into installed JDK.

It means that you have to do certain things by yourself.
1. Create a Java Application project for a JavaFX Application project. Then later on you may need to switch JavaSE project to JavaFX Application project type. The JavaFX Ant tasks of the current Apache NetBeans version (9.0 ~ 12.0) are not ready for JavaFX 11 or higher yet.

2. Add the JavaFX 14 library. You make sure your project is configured to run with JDK 11 or later, and you may add the JavaFX 14 library.

3. Use VM options to run the JavaFX project. You have to integrate JavaFX modules/jars into installed JDK 11 or higher. Then you have to use VM options to run the JavaFX project.

The Installed directories are as following:

C:\Program Files\Java\jdk-14.0.2
C:\Program Files\Java\javafx-sdk-14.0.2.1
C:\Program Files\NetBeans-12.0
C:\Program Files\SceneBuilder

Problem
Your Application continue with error...

JavaFX deployment library not found in active JDK. Please check that the JDK is correctly installed and its version is at least 7u4 on Mac or 7u6 on other systems. BUILD FAILED (total time: 2 seconds)?

Error: JavaFX runtime components are missing, and are required to run this application

Solution
Рекомендации по теме
Комментарии
Автор

"error occurred during initialization of boot layer"
It showing like this how can I solve that.

pcv
Автор

I followed all the steps on your videos, everything went well up until the vm options part, after i enter everything in (correctly and exact) i still get "error" JavaFX runtime components are missing, and are required to run this application" Any Help? I have JDK 13.0.2 and downloaded javafx-sdk-15 if that is any help

Rodolfo-sodl
Автор

@ken, thanks for the video. However, in my case, it is important I build the project because the app needs to be published. How do you suggest I go around this error "JavaFX deployment library not found in active JDK." that occurs during the build process?

ovietennyson