How to configure a project imported from GIT to be a Java project in Eclipse?

I’ve imported a project from Git in Eclipse using this method:
File > Import > Git > Projects from Git > Next > Clone URL .

At this point I inserted the URI like this .
Then my user and password, and the project was imported.

The problem is that Eclipse didn’t recognize it as a Java project, and I really don’t know why.

As consequence, I can’t see errors or warnings on my project and neither use autocomplete, I’m getting this message “This compilation unit is not on the build path of a Java project”.

Also, right click on My-Project > Build path shows the message “No actions avaliable”.

If you need more information to help me, could you ask me on comments, please?
I appreciate your attention!

  • In Eclipse, how to have launch configurations relative to the project?
  • Push more than one netbeans project in one repository
  • Where does Intellij store the data about which content roots are configured for modules?
  • How to Specify subfolder for Maven in Jenkins?
  • Eclipse git plugin and a method to fetch current branch - commit id to Java code version info string
  • Version number of Git commit from a specific branch in TeamCity 8.x
  • How to change the JDK for a Jenkins job?
  • Volley .jar Gradle Build Failure
  • 2 Solutions collect form web for “How to configure a project imported from GIT to be a Java project in Eclipse?”

    Most people don’t include build files in repositories, only source. What you need to do is create a new Eclipse project the create a Git repo on top of that:

    • Create a new Eclipse project, and go to it with your terminal.
    • git init to initialize a repo.
    • git remote add origin to add the remote.
    • git pull -u origin master to pull the changes.

    Also, make sure that when you commit, you don’t add build files that the author kept out. You can do this via a .gitignore file. Simply take this file and add it to your project directory.

    This method applies to most Git repositories, as build and compiled files are usually left out.

    Note that this method requires that you install Git for command line (or Git Bash). You can get Git at their website.

    Since you already have the source code downloaded from the git repository, you should be able to create an Eclipse project from the existing source code.

    Git Baby is a git and github fan, let's start git clone.