'JavaFX runtime components are missing, but jars are added to modules

I'm currently working on one project. Usually I work on windows, but for this weekend I will have to work on my Macbook, so I wanted to continue on my project, but I can't do this, because JavaFX doesn't want to cooperate with me. I was trying a few things, but nothing worked. I have tried with using Java 8-sdk, where JavaFX is built in, but it didn't work. I also installed the JavaFX library and added it to modules in project structure, but it also didn't work. I also wrote a line in VM arguments in runtime configuration, but as you can guess, it didn't work. So I'm stuck and I ask you to help me. I don't know what I should do. When I'm building a new project with Maven, it obviously works, but I want to continue my old project. Of course, I can always copy all files from previous project and add them to my new, but I would like to try work on the same project. Any ideas? (BTW I'm using IntelliJ IDEA. I don't know if it matters, but I use Java 11 and installed JavaFX 18, because I couldn't download JavaFX 11 for my processor architecture)

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

Image of modules in project settings

Image of files in javafx lib folder



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source