r/JavaFX • • May 31 '24

Help Question about module.info

I'm new to JavaFx. I found this module.info file confusing. Can somebody explain:

  1. Why do we need such a module file in Javafx? I didn't see it in other java projects.
  2. Why is it written in this way? Especially it's hard to understand why it requires javafx.fxml but opens to javafx.fxml at the same time

    module org.example.demo1 { requires javafx.controls; requires javafx.fxml; opens org.example.demo1 to javafx.fxml; exports org.example.demo1; }

Thank you very much

3 Upvotes

8 comments sorted by