Main method not found even if I've declared it

后端 未结 7 1782
感动是毒
感动是毒 2020-11-27 07:31

I want to create a simple java class, with a main method, but when I compile my code, I get this error message :

Error: Main method not found in class

7条回答
  •  猫巷女王i
    2020-11-27 07:51

    Right click on the class name (which you are trying to run)->Run As->Run Configurations->Under Main Class Tab

    Write your main class name and hit on Run.

提交回复
热议问题