What does it mean: JavaFX application class must extend javafx.application.Application? [duplicate]
What is meant by this error:
Error: Main method not found in class Static.A, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application
I was trying to run a program Without main Method..
public class A
{
static
{
System.out.println("Hello");
System.exit(0);
}
}
Solution 1:
If you want to run your program either you should have the main
method or if it is a JavaFX application then you have to have the start
method.
According to your class, you don't have neither of the conditions. So that is why you get the error