Eclipse error “Could not find or load main class”

后端 未结 26 1490
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 01:31

I know there are many duplicates of this question, but I have looked at them all, and none of them have solved the issue.

I am trying to run a class that has a main

26条回答
  •  庸人自扰
    2020-12-07 01:48

    If you are facing similar problem,it has to do with the "Run Configurations" not working properly in Eclipse.

    error1

    Please right clik on your java class containing the main method .Go to Run As-> Run Configurations and put the correct patrameters.Project should be the Project which contains the main class and Main class should be fuly qualified class name.See the snapshots below for clarity.It should wok fine then.Basically,you are creating a Run configuration and you can use that saved configuration for later use also.

    selecting run configurationparameters to be entered correctly

提交回复
热议问题