Error: JavaFX runtime components are missing - JavaFX 11 and OpenJDK 11 and Eclipse IDE
Your problem is not compiling the project, but running it.
Since your main
is defined in your Application
-extension, running the project will require JavaFX in your module path on startup.
So either outsource your main
into a class different from your Application
or add the JavaFX modules with VM arguments:
--module-path="<javafx-root>\lib" --add-modules="javafx.base,javafx.controls,..."
See this for some more info.