This window - Java
will appear, for example, when the main class is not defined - the class was created after the project was created
or the main class was defined, but the class no longer exists.
But the dialog box is for selection. Therefore, you should see if the classes with the main method is two or more.
In the cases shown in the pictures, it should do this automatically.
Of course it should inform you about it, but it is useless to have to choose it.
I would be grateful for this function.