Solution:
- Go to Project->properties
- In properties window’s left pane select “Run/Debug Settings”.
- Select “Configure” and click “edit”
- In tab “Main” replace Project to your current project.
- Select “Main class” by clicking on search button(it will be your class name).
- Now hit OK