#Error JavaFX runtime components are missing, and are required to run this application
14 messages · Page 1 of 1 (latest)
--module-path "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2.3\plugins\javaFX\lib" --add-modules javafx.fxml,javafx.controls,javafx.graphics
Hello, if you are using intelliJ to run the application, you have to manually add dependencies for JavaFX. But I would recommend to use Maven or Gradle to handle dependencies. IntelliJ is smart enough to include all libraries based on Maven/Gradle config
I am using gradle but when I build the app into a jar file I would like to run it from the command line although I am not sure how to accomplish this using javafx.
AFAIK the app.jar must contains MANIFEST where are written all dependencies. Java than load them...
Not sure ik what you mean.
in the built app, there should be a file called MANIFEST. In this file are described all dependencies.
Yeah, but "javafx runtime components are missing"
all .jar files are zip archives. You can open it and find the manifest in META-INF directory
Not sure if gradle bundles those components or if I need those externally
I know I have to specify it in Maven builds
you can check this configuration:
https://gist.github.com/dirkarnez/6f6a0a94c4063bded2976d8fde4e5f4a
@nocturne harbor if you are done with the channel pls close it