Openjfx 11
Answered
Is there any information/tutorial on how to set up and use openjdk-11 and openjfx-11? (windows)
I can compile my program but I cannot run it. I get the following message:
Error: JavaFX runtime components are missing, and are required to run this application
What is the setup for the end user to run programs using javafx 11?
Please sign in to leave a comment.
Hi. Try this advice:
https://stackoverflow.com/a/52470141/104891
I followed that advice on Stackoverflow but did not understand point 4 which read :
4. Before you run the default project, you just need to add these to the VM options:
--module-path /Users/<user>/Downloads/javafx-sdk-11/lib --add-modules=javafx.controls,javafx.fxml--I'm new to Java and was forced from Netbeans to IntelliJ Ult.(long story).
I looked up VM..and found under Help : Edit Custom VM options ..is that it?
It created a file that looked like it had nothing to do with the line above? (As below.)
Can someone spell it out in simple terms for an idiot like me. thanks!
I found this which helps although I still have issues..
Scope is Compile (which is the default.) You can then edit this to call it JavaFX by double-clicking on the line.
then in Run->Edit Configurations -> VM Options, put: --module-path="C:\Program Files\Java\javafx-sdk-11\lib" --add-modules=javafx.controls
(oh and don't forget to set the SDK)
<quote>then in Run->Edit Configurations -> VM Options, put: --module-path="C:\Program Files\Java\javafx-sdk-11\lib" --add-modules=javafx.controls</quote>
when I create a new one project I have to do the same actions. Is it possible to set up it once and don't repeat it every time?
Hello Victor,
It's possible to add it in "Run->Edit Configurations->Templates".
Sorry, but I don't understand which one should I edit for FX. Please, explain
Victor,
JavaFX projects use "Application" run configuration. You could change default template "Run->Edit Configurations->Templates-> Application" adding your option. Please note that it will affect all generated run configuration of "Application" type.
Thanks a lot
It would be great if this entire process could be simplified with some sort of built wizzard to set it up properly.. feel like half the problem with java development is the crazy setup process just to get it all compiling and running.. for a some one not at all familiar with it, it's a real head banging experience trying to figure out why things don't work and what it is that needs doing to get things working.. I mean does it really need to be like this? As an IDE could surely do more in this area I think.
You can vote and follow related request: https://youtrack.jetbrains.com/issue/IDEA-199616
I added this to the VM and It worked
--module-path "C:\Program Files\JAVAFX\javafx-sdk-16\lib" --add-modules javafx.controls,javafx.fxml