0

I'm trying to set up an IntelliJ application, and can't get something quite right.

Being hit with an error when I try to run it:

"C:\Program Files\Java\jdk-19\bin\java.exe" ...
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.controls not found

Process finished with exit code 1

I uploaded the lib folder for openjfx, as well as the pathway to the lib folder in Project Structure.

I used these three pages in order to help me get to where I currently am:

In the VM Options under Run Configurations, I put the pathway to the lib folder:

--module-path C:\Users\wtfri\Downloads\openjfx-19_windows-x64_bin-sdk.zip\javafx-sdk-19\lib--add-modules=javafx.controls

I feel like I made a mistake somewhere in the snippet of code I put into the VM options, but I'm not experienced enough yet to know what's going on.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
n00biew0lf
  • 27
  • 5
  • somehow the links didn't go through for what I used for my help -- here they are: [](https://intellij-support.jetbrains.com/hc/en-us/community/posts/6415280540562-Where-can-I-find-the-Create-project-from-template-and-the-Base-package-settings-when-creating-a-new-project-) [](https://stackoverflow.com/questions/51478675/error-javafx-runtime-components-are-missing-and-are-required-to-run-this-appli) [](https://stackoverflow.com/questions/71215161/eclipse-ide-error-could-not-find-or-load-main-class-javafx-fxml-caused-by-java) – n00biew0lf Jan 05 '23 at 00:13
  • You need a space between the module-path and the next directive, e.g. NOT `javafx-sdk-19\lib--add-modules=javafx.controls`, but instead `javafx-sdk-19\lib --add-modules=javafx.controls`. – jewelsea Jan 05 '23 at 00:19
  • The command-line information in the `...` is important for the question. In the Idea console that you copied this text from, you can get the full command line by clicking on the `...` in the console, which will expand it, then you can copy and paste the full command line into the question. – jewelsea Jan 05 '23 at 00:22
  • Also, check that you are [setting VM options](https://stackoverflow.com/a/67960821/1155209) and not program execution arguments. – jewelsea Jan 05 '23 at 00:26
  • 1
    `C:\Users\wtfri\Downloads\openjfx-19_windows-x64_bin-sdk.zip\javafx-sdk-19\lib` — That looks like you're pointing to a directory inside a ZIP file. Is that what's happening? Because I don't believe that's possible (at least not by default). You should be extracting the ZIP file, then pointing to the extracted directory. – Slaw Jan 05 '23 at 00:33
  • It is probably easier to get started with JavaFX using the [new project wizard](https://stackoverflow.com/questions/74764217/error-javafx-runtime-components-are-missing-with-intellij-idea-maven-and-jdk/74764297#74764297) rather than a downloaded SDK. I recommend using the wizard instead. – jewelsea Jan 05 '23 at 00:35
  • 1
    @Slaw I removed the ".zip" and it went through--looks like that was it. – n00biew0lf Jan 05 '23 at 00:46
  • @jewelsea I'll add the space in the path as well -- thank you for that! – n00biew0lf Jan 05 '23 at 00:46

0 Answers0