I have just started a new project based on AdoptOpenJDK 11
and OpenJavaFX 11
.
Before during my development, I used VM Arguments which was not always practical when you pass the project to someone else.
So I started to replace my VM Arguments with the module-info.java
file.
VM Arguments before:
--module-path ${PATH_TO_FX} –add-modules javafx.controls,javafx.fxml
--add-opens
javafx.base/com.sun.javafx.runtime=ALL-UNNAMED
--add-opens
javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED
--add-opens
javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED
--add-opens
javafx.base/com.sun.javafx.binding=ALL-UNNAMED
--add-opens
javafx.base/com.sun.javafx.event=ALL-UNNAMED
--add-opens
javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED
--add-opens
javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED
module-info.java
file now:
module hellofx {
requires javafx.controls;
requires javafx.fxml;
requires transitive javafx.graphics;
opens org.openjfx to javafx.fxml;
exports org.openjfx;
}
This is where I have a problem, I managed to replace the tag --module path
but I can not find a solution for tags --add-open
.
Can someone help me?
Edit 12/09:
Now I have a new error with this two lines in the module-info.java
Duplicate requires entry: javafx.fxml
How I can solve this?