StringForever StringForever - 10 months ago 51
Java Question

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?

Answer Source

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 .