Reputation: 693
I opened a project in NetBeans, it is a Maven-based project and i have a problem with javafx imports. There is a communique f.e.: "package javafx.animation does not exist".
Normally when I create a new JavaFX projekt I select the Java with Ant > Java Aplication and then when I right click on my project on the projects list I choose Properties and in the Libraries section I can add JavaFX library.
In this case, when I open maven-based project there is not Libraries section in the properties and I don't know how to add the JavaFX library?
Upvotes: 1
Views: 1946
Reputation: 4380
Instructions for using JavaFX with Maven and Gradle-based projects are found here:
https://openjfx.io/openjfx-docs/
I suspect you are running on a JDK that does not have JavaFX modules included. That is normal. However, there are some builds of OpenJDK that include the JavaFX modules so you don't have to add them manually. Using such a JDK may make things easier. Consider one of the OpenJDK builds from Azul or Bellsoft that includes JavaFX.
For Bellsoft choose the "Full JDK": https://bell-sw.com/pages/downloads/
For Azul choose "JDK FX" as the "package": https://www.azul.com/downloads/zulu-community/?package=jdk
Upvotes: 2