当前位置: 动力学知识库 > 问答 > 编程问答 >

eclipse - Java main class not found after renaming

问题描述:

After refactor->renaming my main class (which contains the main-Method) eclipse doesn't detect it and I can't run this class (because the list near the green run button doesn't show my class).

I tried Project -> clean..., but this didn't change anything.

What is wrong here? Can there be such a big error in eclipse?

网友答案:

Go to "Run Configurations...", select your old working configuration, then change the name of the main class to execute.

Or simply right-click on your main class, and select "Run as..."-->"Java application", which will create a new run configuration .

分享给朋友:
您可能感兴趣的文章:
随机阅读: