Class Xmain not found in module Ymain
Answered
After upgrading my IJ version (to 2024.3) I am getting an error/warning that my main class is not found in Module - the main module.
This is a simple JavaFX “Hello” app where I had used gradle for the building of it.
It runs fine, but now has this issue about the class not found in the module.
I noticed that there is no .iml file, and so I selected the option in the gradle options to generate it - but the iml file is not generated and I am wondering if that is the issue, i.e. that the .iml file is not there?
See edit config image below.

Please sign in to leave a comment.
Hello!
Thank you for reporting this!
While
.iml
file behavior is interesting, it is unlikely to cause this issue.Does the issue persist for newly created Run Configurations?
As a possible workaround:
build.gradle(.kts)
If the issue persists still, could you please share the affected Project?
Hello Roman,
Yes the issue persists if I create a new run configuration.
Also, since my machine was just re-imaged, a new fresh system Directory was generated and I have the same issue.
Please let me know how to “share the… project” with you.
Thanks,
Bruce
Bg Hennessy You can share the Project using our upload service.
Please post the Upload ID here once the upload is complete.
Uploaded entire project via zip file: Upload ID: 2024_11_28_dyvPB19uHcx2xZgzHDt4jT
Bg Hennessy Thank you for sharing the Project.
Please make sure you select
-cp brucehellojavafx.main
and not-cp brucehellojavafx
:That should allow you to run the Application.
Thanks Roman that was the problem. Although I do think it was selected like that by default, but I changed it as you suggest and that warning/error is gone. Thanks again!