How to Use NetBeans 23, JDK 23, and Scene Builder 23 for JavaFX 23 on Windows 11

Описание к видео How to Use NetBeans 23, JDK 23, and Scene Builder 23 for JavaFX 23 on Windows 11

In this tutorial, I will guide you through the process of using NetBeans IDE 23, JDK 23.0.1, and Scene Builder 23.0.1 for JavaFX 23.0.1 on Windows 11 (64-bit).

Since the release of JDK 11 in 2018, Oracle has made JavaFX a separate project called OpenJFX. This means that JDK 11 and later versions no longer include JavaFX. To continue using JavaFX, you can either stick with JDK 8 (supported until March 2025) or use OpenJFX 11 or higher with a compatible JDK.

If you're using NetBeans 23 and JDK 23.0.1 for JavaFX 23.0.1, you’ll first create a Java Application project and later convert it to a JavaFX application. Afterward, you can design the user interface using JavaFX Scene Builder 23.0.1 and add the JavaFX 23.0.1 library to run your application.

Converting to JavaFX in NetBeans 23.0.1:
In your JavaApplication project, go to Properties.
Navigate to Deployment.
Select Switch Project to JavaFX Deployment Model.

This will convert your Java application to a JavaFX application, allowing you to design and run your JavaFX interface.

Important: JavaFX 23.x requires at least JDK 11.

You should download the following:

JDK 23.0.1 is available from https://www.oracle.com/java/technolog...
Apache NetBeans 23 is available from https://netbeans.apache.org/download/...
Open JavaFX (OpenJFX) 23.0.1 is available from https://gluonhq.com/products/javafx/.
JavaFX Scene Builder 23.0.1 is available from https://gluonhq.com/products/scene-bu...

The Installed directories are as following:

C:\Program Files\Java\jdk-23
C:\Program Files\NetBeans-23
C:\Program Files\Java\javafx-sdk-23.0.1
C:\Users\your_username\AppData\Local\SceneBuilder

Set up JavaFX in your project:
Use this command in your project to point to the JavaFX library:

--module-path "C:\Program Files\Java\javafx-sdk-23.0.1\lib"
--add-modules=javafx.controls,javafx.fxml

This will help you get JavaFX running with your project.

Комментарии

Информация по комментариям в разработке