-1

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

Mark Rotteveel
  • 90,369
  • 161
  • 124
  • 175
zonley
  • 1
  • 2
  • 1
    Maybe you should start here: https://openjfx.io/openjfx-docs/#install-javafx You need to add more than just "the jars" to get javafx to work. Also, there isn't anything connecting your lib folder to your project. – matt May 20 '22 at 14:48
  • Does this answer your question? [Change JavaFX 11 implementation in IntelliJ from "build and run with jvm options inside IDE" to "create runtime image"](https://stackoverflow.com/questions/62054292/change-javafx-11-implementation-in-intellij-from-build-and-run-with-jvm-options) – Giovanni Contreras May 20 '22 at 19:14
  • It looks like you are using Idea, I suggest you use the new JavaFX project in the IDE [following this process](https://stackoverflow.com/questions/71498158/java-lang-module-findexception-module-test-not-foundintellidea/71500774#71500774), rather than maintaining the project setup manually. If you do so, the project can easily be imported and shared between environments as any modern Idea IDE installation (and perhaps some other IDEs as well), will be able to automatically import and run the application with no additional local setup. – jewelsea May 20 '22 at 20:57
  • I recommend [MaterialsFX](https://stackoverflow.com/questions/71931192/using-materialfx-in-intellij/71931282#71931282) over jfoenix it is better maintained and I think the version of jfoenix you are trying to use is incompatible with the JavaFX version you are trying to to use. – jewelsea May 20 '22 at 20:59
  • Please provide enough code so others can better understand or reproduce the problem. – Community May 21 '22 at 23:05

0 Answers0