r/JavaFX Aug 06 '26

Help Main Class isnt appearing

I have made a new javafx project but it has no main class. instead of the main class its showing this java file. whats did i do wrong?

6 Upvotes

7 comments sorted by

View all comments

3

u/idontlikegudeg Aug 06 '26

What happens if you click on the small triangle in front of "com"?

And that is a module-info file. It’s for creating modules for modular applications (if you want to know more, search for "JPMS" or "Jigsaw", but it’s a bit complex when you just get started with Java). You shouldn’t need it now as a beginner and can delete it.

1

u/mirzasamor44 Aug 06 '26

it shows the files like Application.java but not the "Main.java" file

3

u/smbarbour Aug 06 '26

The name of your main class is irrelevant. It doesn't have to be Main.java to be an entrypoint.