Search code examples
javajavafxopenjfx

How do I create a JavaFX Application Using Netbeans IDE and Java 19.0.1


I am trying to create a JavaFX application using Netbeans IDE. Whenever I try to create one, the IDE says "Your JDK version does not support JavaFX." although the JDK is updated.

I'm really confused about how this will work.

I've been practicing and creating JavaFX applications on an online compiler since I was unable to run JavaFX on my Windows computer.

Now that I'm getting serious and want to create a good project using JavaFX, I want to use my go-to IDE, Netbeans. I've been experiencing a lot of problems.

Went to my professor about this, and he told me that there was some kind of fallout between Oracle and OpenJFX and they have pulled off the support of JavaFX from the latest versions of JDK. That confused me even further.

I've been browsing the internet for quite some time and came across the notion of OpenJDK and I kinda get the point but I don't know how to work with it.

I'm hoping to get an explanation of what all this mess is and how I can work it out and create my JavaFX project.


Solution

  • starting a javafx project with maven on netbeans ide

    You can start either with fxml or pure java code on >> new project window >> java with maven >>FXML javaFX Maven Archetype or Simple javaFX Maven Archetype .

    new project

    Then select name and location. Then ,set 19 as value in javafx-version key and 0.0.8 in javafx-maven-plugin-version

    maven

    Maven will download dependencies and project template can be run locally javafx 19