user813853
user813853

Reputation:

Can not find or load the main class , why?

I have Git repository on Github. I clone it using EGit plugin inside Eclipse Mars.

In the package explorer, I imported the existing git local repository into a general eclipse project.

I then converted the default project to Java type using this answer : https://stackoverflow.com/a/13750958/813853

I set the /src/ folder as Source folder.

When I run as Java Application I get the following error :

Error: Can not find or load the main class Editor

I don't know from where comes the error ?

Edit 1

enter image description here

Upvotes: 1

Views: 1077

Answers (2)

Sasikanth Bharadwaj
Sasikanth Bharadwaj

Reputation: 1457

Well, editing the .project and .classpath files is not at all recommended. In your case, you added the java nature but the java builder is not configured and so is not building your project. Instead of importing into a general project and converting it into a java project, you could have created a java project and imported your stuff into it. Just right click the project, choose Import-> File system and choose the src folder in the dialog

Upvotes: 1

user813853
user813853

Reputation:

The problem was in BuildSpec : I have to do it like this :

enter image description here


I had to modify .classpath and .project correctly as described in this answer.

Upvotes: 1

Related Questions