I'm getting this error saying that I haven't defined a main method when trying to run my programme from the terminal. I have defined a main method as below and it runs fine in the IDE, so I'm not sure why it is throwing this error:
Error: Main method not found in class Quarterly_Report, please define the main method as:
*public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application*
This is the code:
public class Quarterly_Report{
public static void main(String[] args){
Department kitchen = new Department("Kitchen", 0, 0, 0, 65000, 67000, 56000, 45000, 56000, 72000, 0, 0, 0);
Department electrical = new Department("Electrical", 0, 0, 0, 67000, 63000, 78000, 78000, 104000, 103000, 0, 0, 0);
Department bathroom = new Department("Bathroom", 0, 0, 0, 63000, 63000, 65000, 71000, 73000, 69000, 0, 0, 0);
Department softFurnish = new Department("Soft Furnishings", 0, 0, 0, 18000, 24000, 22000, 19000, 17000, 16000, 0, 0, 0);
Department accesories = new Department("Accesories", 0, 0, 0, 16000, 23000, 21000, 19000, 20000, 19000, 0, 0, 0);
ReportMethods report = new ReportMethods();
report.departments.add(kitchen);
report.departments.add(bathroom);
report.departments.add(electrical);
report.departments.add(softFurnish);
report.departments.add(accesories);
report.chooseQuart();
}
}
I tried compiling and running this from the terminal, but it is just throwing an error.
It runs fine in the IDE I'm using, so not sure what the issue is!