0

My NetBeans cannot find any main file in the project. This problem occurs only if the main file is inside some package. But due to project specifics, the main file cannot be on the top of the package tree. I tried all advices which I found (clear cash, copy all files into a new project, create another main file...). Nothing works. I am afraid that the problem can be caused by the modular system of java. I am using a traditional ANT build with NetBeans configuration.

EDIT: I find out that if I remove module-info file, the problem disappears (but it must be in the project -> required by the project leader).

module MiningFlow {
   requires GraphVizualization;
   requires dockfx;
   requires javafx.swt;
   requires javafx.base;
   requires javafx.controls;
   requires javafx.fxml;
   requires javafx.graphics;
   requires javafx.media;
   requires javafx.swing;
   requires javafx.web;
   requires MiningGIT;
   opens workflow;
   opens appstart to javafx.graphics;
   opens impl.parameters.selectattrs to javafx.fxml; 
}

If I click on the file and if I start it manually from the project, everything works.

enter image description here

Ján Яabčan
  • 743
  • 2
  • 10
  • 20
  • What do you mean by "main" class? And just to be sure, those are package names there? (if so, please read about java naming conventions. A package shouldn't be named just "appstart" for example) – GhostCat Jan 17 '23 at 12:27
  • Did it work before? If yes, what got changed? What happens if you build and start the application on the command line? – Thomas Jan 17 '23 at 12:36
  • Yes, it was fine with java 8. After migration to java 11 the problem have occured. – Ján Яabčan Jan 17 '23 at 14:04

0 Answers0