I just recently attempted to make a modular project.  

I’m using JavaFX so I tried the somewhat-official  javafx gradle plugin and 
used the modular gradle example from here: 
https://github.com/openjfx/samples/tree/master/CommandLine/Modular/Gradle/hellofx
 
<https://github.com/openjfx/samples/tree/master/CommandLine/Modular/Gradle/hellofx>

NetBeans is not happy with this at all.

module-info.java claims the javafx.controls module cannot be found

The code editor complains about all the javafx imports stating that:

   "package javafx.scene is not visible
    (package javafx.scene is declared in the unnamed module, but module 
javafx.scene does not read it)"


Does anyone know the solution?

From the command line ‘“gradle build” works without any complaints.

It looks like NetBeans sees the JavaFX stuff as added to the class path instead 
of the module path.

I can use JavaFX in a non-modular way, and I can hack the Gradle manually to 
insert —add-module and —module-path args to various build steps, but I was 
trying to do things based on the examples.

Scott

Reply via email to