0

I last wrote java 10 years ago, but coming back to it today, I can't get started with a demo app that I've been given. I'm using Eclipse and when I right click on the class that does have the main function defined, it says "Selection does not contain a main type", see images. Can someone point me in the right direction? Thanks .

Trying to run java application response: Selection does not contain a main type

Stochastically
  • 7,616
  • 5
  • 30
  • 58

1 Answers1

3

Right-click on the main/java folder and use the Build-Path submenu to designate it as a Source Folder. Only top-level classes with a valid main method and located in in Source Folders are runnable as Java Applications.

nitind
  • 19,089
  • 4
  • 34
  • 43