Error: Selection does not contain a main type
I hope you are trying to run the main class in this way, see screenshot: If not, then try this way. If yes, then please make sure that your class you are trying to run has a main method, that is, the same method definition as below: I hope this will help you.