Runtime: --module-path "./lib" --add-modules javafx.controls,javafx.fxml
How to get rid of the red imports and errors:
- Click on the cog wheel in the top right(sometimes looks like yellow up arrow).
- Then open project structure.
- Open the libraries tab on the left.
- Press the plus sign at the top, then the java option.
- From there you want to open your project file by clicking the little arrow next to the name.(for me, it's called SC6DungeonCrawler-1)
- Then select the lib folder within the project file, and click OK. (You may get a few pop-ups, just click yes or OK, and it should be fine)
- Then click apply and OK.
- All red imports and run errors should be corrected.
How to Run the application properly:
- First copy everything within the following parenthesis ( --module-path "./lib" --add-modules javafx.controls,javafx.fxml ).
- Next click on the drop-down list between the hammer and triangle at the top of your screen.
- Click edit Configurations.
- Next click the plus in the top left, and select the "Application" option. You can name the configuration whatever you want.
- In the Main class slot, type in (Main).
- Then click the "Modify options" button, followed by the "Add VM Options".
- Paste the previously copied text into the VM options slot and apply the settings.
- Click OK and then run the project it while the new configuration is selected in the drop-down.