0

I have a JavaFX 11 Maven-based project that I created in Netbeans 11.3. Everything was working fine (building and running the project). Last night, after restarting Netbeans, I can no longer run the project. When I attempt to run it, I am presented with the "Select Main Class for Execution" dialog, which informs me that "No main classes found", with no way to specify one. enter image description here I do have a proper main class.

If I edit the project Run settings, and try to browse for the main class, I get the same message: "No Main Classes Found". enter image description here

I am at a loss on how to resolve this.

When I set up this project I did follow the JavaFX 11 getting started steps for Netbeans, Modular project, with Maven, here: https://openjfx.io/openjfx-docs/

MukRaker
  • 49
  • 12

1 Answers1

0

in Netbeans, try to:

  1. Copy your current code (or back it up in a different location)
  2. Delete your current file
  3. Create a new main class in your project (you can name it the old one)
  4. Paste your code back in

If this doesn't work then try to clear the Netbeans cache, and if all else fails, then just do a clean un-installation and re-installation of Netbeans.

StormSpirite
  • 110
  • 7
  • Deleting and recreating the file did not work. Clearing the cache did not work. I did find that I could click on the Project in the Projects Tab, and then double click the "javafx run" Maven goal in the navigator. I can also run "mvn javafx:run" from the command line. – MukRaker Apr 21 '20 at 04:26
  • I also tried deleting my local Maven repository, and then running a clean/build, to no avail. I may need to copy the code off and recreate the project... – MukRaker Apr 21 '20 at 14:19