It’s IntelliJ right? When you open the Application class, there should be a small green Triangle near the line number that you can click to start the application.
In Java, you don’t need a Main.java. You need a public class that contains a public static void main(String[] args) method. For JavaFX, you don’t even need to write that yourself. You can simply run a class that is derived from the JavaFX Application class.
EDIT: I just looked it up and current documentation says JavaFX must be loaded from the module path, in that case, you need the module-info.java. I always write modular applications and wasn’t aware of this change.
View all comments
Show parent comment
1
u/mirzasamor44 Aug 06 '26
it shows the files like Application.java but not the "Main.java" file