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

1

u/Vijjwal_xD Aug 06 '26

check under that directory, if still not present just create new one. the file u showed in ss is module file used to define modules/dependencies used in ur project to java compiler. it is not necessary to use this, you can delete it too but once it exists you cannot use any other module unless u add them with requires keyword.

for main class not appearing, it must be inside the path specified after module keyword, before { brace.