Something strange is happening.
I created a new project in Eclipse and encoded for a while. With four classes, one of which contains the main method, all four in the package, I was ready for the first test run. When I press Ctrl + F11 (Run), a message similar to the following appears:
Selection does not contain a main method.
So, I move on to the Run configuration, and I found that the main class is not installed. When I click the appropriate search button to indicate the main class, the dialog that appeared was empty. The dialogue worked fine, but there was no choice for me.
Files are in the right place both in the project and on the hard drive. The selected project in the Run configuration is also correct.
I tried to switch between JRE, but nothing. Restarting Eclipse or updating a project is also useless. If I manually type in the class name (Main), it will simply tell me that the Main class is not found when I try to start it. I also tried moving the class to another package.
I have done several projects with this Eclipse installation on the same computer. The first launch sometimes does not work, but driving with Run configurations always fixes it quite easily. This time it seems that I'm doomed to never run this program. Perhaps the project was a bad idea in the first place ...
Has anyone encountered this problem before? Did I miss the stupidest thing right in front of my eyes?
source share