解决方法如下:
1.Go to Project->properties
2.In properties window’s left pane select “Run/Debug Settings”.
3.Select “Configure” and click “edit”
4.In tab “Main” replace Project to your current project.
5.Select “Main class” by clicking on search button(it will be your class name).
Now hit OK