Squareoot
Squareoot

Reputation: 280

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?

Upvotes: 0

Views: 1780

Answers (1)

Arnaud
Arnaud

Reputation: 17534

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 .

Upvotes: 4

Related Questions