Why can’t I run a Java file in Eclipse?
There could be possible reason for this issue
- Your Class file may not contain main method
- Incorrec buildpath configuration of project
- Default Run Configuration may not select the Class name .
So Check and correct , Click Run->Run Configuration and update for correct class name and Click Run