Search code examples
intellij-ideajavafxjava-21

JavaFX 21 IntelliJ Idea non modular with Maven application on Windows 10, how to run (Error: JavaFX runtime components are missing...)


When I use this code locally :

  • I can build and compile

  • I cannot Run, because I've got this error :

    • Error: JavaFX runtime components are missing, and are required to run this application.

I'd like to understand why all the dependencies are in my maven project and the path to the JDK is ok.


Solution

  • Thanks @SLaw, it's my fault, I found the error with mvn javafx:run -X, the maven compiler plugin of mainClass in the build, was not the right one.