I am running a java program where it shows a JavaFX when I run the Main.java class. When I run the Main in my intelij it works fine but after I build artifacts I can’t run the jar file and get this error
Error: JavaFX runtime components are missing, and are required to run this application
I have tried adding a VM options which is
<code>--module-path "C:Program FilesJavajavafx-sdk-21.0.3lib" --add-modules javafx.controls,javafx.fxml
</code>
<code>--module-path "C:Program FilesJavajavafx-sdk-21.0.3lib" --add-modules javafx.controls,javafx.fxml
</code>
--module-path "C:Program FilesJavajavafx-sdk-21.0.3lib" --add-modules javafx.controls,javafx.fxml
But when I add this and run the main class I get error. (Still cant run the jar file)
<code>Error occurred during initialization of boot layer java.lang.module.FindException: Module sample.claimapp not found
</code>
<code>Error occurred during initialization of boot layer java.lang.module.FindException: Module sample.claimapp not found
</code>
Error occurred during initialization of boot layer java.lang.module.FindException: Module sample.claimapp not found
So I am not sure how to fix this problem.
BTW i use
<code>java -jar ClaimApp_jar.jar
</code>
<code>java -jar ClaimApp_jar.jar
</code>
java -jar ClaimApp_jar.jar