JavaFX 11: “missing JavaFX runtime component”

I am trying to use jGRASP 2 under Windows 10 to run the sample JavaFX code under JavaFX 11 and Java 11 (taken from Java Illuminated Edition 5).
I have carefully read the introduction to deployment headaches guide (, although has made some progress, but I’m still very confused.
I downloaded the latest ZIP file, unzipped it, and updated the CLASSPATH to include the path to the JAR files needed to compile. I can compile the file successfully. However, when I tried to run it, the following error message appeared:

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

The getting Started guide says you can solve this problem by adding the following options to the runtime call:

– the module – the path “/ path \ lib” – add – modules = deployment headaches. Controls, deployment headaches. FXML

I’ve added options, but I still get an error message.
Previous StackOverflow articles usually end with the above option; Las, I don’t know what to do.
The best answer
As a first-time user, I managed to make it work, but it wasn’t easy for me.
I don’t think many people are familiar with this IDE, so I’ll follow the basic steps to publish the steps I followed:
> Download and install jGRASP version 2.0.5_05 Beta.
> Since I already had some JDKS installed, JDK 10.0.2 was selected by default, so my first step was to find a way to use JDK 11. In the Settings – & gt; The jGrasp boot setup, where you can set the path to the Java executable:
Then I reactivated the jGrasp. You can check out the tool -> Verify which JDKS are used in the IDE. System information -& GT; Java version.
> Open the HelloFX sample class. I’ll start with the OpenJFX Docs for the most basic example. You can find the code here.
> Build – & gt; Since JavaFX is no longer part of the JDK, compiling as expected causes a lot of errors:
> According to the OpenJFX documentation, we need to download the JavaFX SDK from here and then add the libraries to the classpath. Go to Settings -& GT; Path/classpath -& GT; In the workspace, press “new,” then add the different javafx jars one by one from the SDK/lib folders you downloaded (at least javafx-base.jar,javafx-graphics.jar and javafx-controls. Jar).
> Build – & gt; The compile should work now. Next step: Build -& GT; Run. This will fail:

----jGRASP exec: java HelloFX
Error: JavaFX runtime components are missing, and are required to run this application

 ----jGRASP wedge: exit code for process is 1.
 ----jGRASP: operation complete.

That was to be expected. According to the documentation, we need to set the module-Path and Add-Modules parameters.
> First try: Using run parameters. After the Settings:

--module-path /Users/<user>/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls

It fails to run again and displays exactly the same error message as above, but with one difference in the console log:

----jGRASP exec: java HelloFX --module-path /Users/<user>/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls

What’s wrong!! Well… If you try this on the command line, it will also fail because the arguments are in the wrong order, so the VM arguments should precede the class name.
Conclusion: Run parameters are not VM parameters!
> Second try: To provide VM parameters, The option I found was edit Settings -> Compiler Settings -& GT; Workspace. By default, it USES a generic JDK (integration debugger). You can view it and see it in action using:

java %S -ea %S %<FLAGS2> %<MAIN_CLASS> %<ARGS>

So we need to find a way to set up FLAGS2 instead of ARGS.
Fortunately, next to the Environment TAB, there is a Flag/Args TAB where we can set the VM parameters in FLAGS2:

--module-path /Users/<user>/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls

> Apply, close the dialog, and then Build-> Run the course, it’s now ready to use!
If you see the console log, it contains exactly what commands you will use when running on the command line:

----jGRASP exec: java --module-path /Users/<user>/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls HelloFX

 ----jGRASP: operation complete.

I think the next step will be to run a more complex project…

Read More: