I am trying to use the JavaFX SDK in Intellij Idea. I know that you can create a JavaFX project in intellij idea directly, through the wizard, but I need to make a current project compatible with JavaFX and I'm trying to install the library. I am new to JavaFX and I am pretty sure I'm doing something wrong during the installation. What I did to install JavaFX was:
- downloaded the SDK
- added the lib folder (inside the SDK) as a library to the project
- added the following line to the VM options "--module-path /path-to/JavaFX/lib --add-modules=javafx.controls". (Of course the "path-to" was replaced with my path to the lib folder)
When I try to run my code I get this error:
I am using MAC OS, I tried doing the same thing on my other machine (Linux) but I had the same error.
I am new to JavaFX and pretty new to java, I saw something about some run components, I am not sure what does are. I looked to see if they are something that I need to install but I did not find any useful information about them. I am using java 18.
I could really use some help. Thank you!