Editor does not contain a main type in Eclipse [duplicate]

Problem is that your folder is not identified as a Source folder.

  1. Right click on the project folder -> Properties
  2. Choose ‘Java Build Path’
  3. Click on ‘Sources’ tab on top
  4. Click on ‘Add Folder’ on the right panel
  5. Select your folders and apply

Leave a Comment