"Package javafx.application is declared in module javafx.fxml, which is not in the module graph"

Answered


Hi, I have changed 2018.1.2 Ultimate to 2018.2.2.Community, Ultimate Version worked with JavaFX correctly, but Community show this problem:
"Package javafx.application is declared in module javafx.fxml, which is not in the module graph"
"Package javafx.fxml is declared in module javafx.fxml, which is not in the module graph"
"Package javafx.scene is declared in module javafx.fxml, which is not in the module graph"
"Package javafx.stage is declared in module javafx.fxml, which is not in the module graph"

How to make JavaFX work??

0
2 comments

So, looks like the javafx.application package is not in the Java 9 module path. You can add it to module path by adding --add-modules javafx.application in File | Settings | Build, Execution, Deployment | Compiler | Java Compiler | Javac Options | Additional command line parameters:

or add require directive in your java module.info configuration file. See also example here https://github.com/ozlerhakan/java9-module-examples/tree/master/javafx#javafx about

 (package javafx.application is declared in module javafx.graphics, but module com.example.javafx does not read it)

error.

If issue remains, provide a sample project.

1

 ThankYou, Andrey, solution of the issue was simpler than I thought. 






0

Please sign in to leave a comment.