Java11 / JavaFX and Maven will not run outside of NetBeans IDE 9

前端 未结 2 1889
不知归路
不知归路 2021-01-01 21:59

As per JavaFX deployment library not found in active JDK

I used José Pereda Maven approach and it works well in NetBeans but as soon as I try and run it outside wi

相关标签:
2条回答
  • 2021-01-01 22:42

    I've got similar issue when doing default hello world javafx project in the IntelliJ IDEA with openjdk 11 and openjfx 11. The work around is to use offered CLI in the project configuration.

    But in this case the solution is kind of hack instead of proper configuration fix. My problem was that I hadn't any module-info.java to initialize proper java platform module. Therefore the IntelliJ module is actually unnamed module. After create proper module descriptor the project is not unnamed platform module any more.

    Next issue what I got is related to using external java platform module as a jar file (openjfx libs to be specific). This need to be solved by adding libraries in the project structure settings.

    And then it will work without any additional CLI arguments.

    0 讨论(0)
  • 2021-01-01 22:45

    One way to fix that would be to append the following args to the command line

    --add-exports=javafx.graphics/com.sun.javafx.util=ALL-UNNAMED
    
    0 讨论(0)
提交回复
热议问题