Issue
I'm pretty new to programming and have gotten some help with something that I'm working on. That said, now my project isn't recognizing that the main method is there. I've made sure several times that the run's main class is a valid route, but it still doesn't seem to recognize that the file is there. No other files recognize any imports from that package, and the package doesn't recognize any imports from other files.
The error code
ant -f C:\\Users\\Andrew\\Documents\\NetBeansProjects\\InventorySystem -Dnb.internal.action.name=run run
init:
Deleting: C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\build\built-jar.properties
deps-jar:
Updating property file: C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\build\built-jar.properties
Compiling 12 source files to C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\build\classes
C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\src\Software1C482\InventorySystem.java:9: error: duplicate class: InventorySystem
public class InventorySystem extends Application {
C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\src\ViewController\HomeWindowController.java:16: error: cannot access InventorySystem
import Software1C482.InventorySystem;
bad source file: C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\src\Software1C482\InventorySystem.java
file does not contain class Software1C482.InventorySystem
Please remove or make sure it appears in the correct subdirectory of the sourcepath.
C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\src\ViewController\HomeWindowController.java:261: error: cannot find symbol
public void setMainApp(InventorySystem mainApp) {
symbol: class InventorySystem
location: class HomeWindowController
C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\src\module-info.java:21: error: package is empty or does not exist: Software1C482.InventorySystem
exports Software1C482.InventorySystem;
C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\src\Software1C482\InventorySystem.java:26: error: cannot find symbol
HomeWindowController controller = viewLoader.getController();
symbol: class HomeWindowController
location: class InventorySystem
Note: C:\Users\Andrew\Documents\NetBeansProjects\InventorySystem\src\ViewController\ModifyProductController.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors
Run arguments is: java -p --add-modules=javafx.graphics,javafx.fxml,javafx.controls -jar inventory.jar
I've tried getting the code hierarchy but alt+shift+F12 doesn't seem to do anything.
Solution
It was an obvious error on my part, I linked the whole file instead of just the package in module-info.
Answered By - Mataske