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 .
Asked
Active
Viewed 23 times
0
-
Also see https://stackoverflow.com/q/16225177/2670892 – greg-449 Apr 23 '23 at 07:00
1 Answers
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