Import Java project from GitHub to Eclipse

后端 未结 2 607
深忆病人
深忆病人 2021-01-24 23:25

I\'m trying to import a project on GitHub into eclipse because there are a few things I want to add to it. However whenever I add it I get a ton of errors and problems with it..

相关标签:
2条回答
  • 2021-01-24 23:58

    First, make sure you are using Luna, the most recent version.

    In eclipse, File > Import > Git > Projects from Git > Existing Local Repository. In the Import Projects from Git screen, click add, then goto the location of the cloned repository. Click open, finish, then next. Select Java > Java Project, and click next again.

    At this point, there are three options.

    1. Import existing projects
    2. Use the New Project Wizard
    3. Import as General Project

    Pick "Use the New Project Wizard". Then, uncheck "Use Default location", and click browse. Select a folder (You probably want the location you cloned the repo to), click "Open", and give the Project a name. Click next, and make sure that the src/bin folders are setup correctly, and click finish.

    Whew!

    Of course, the Import from Git option was only added in Luna, so update eclipse if necessary.

    0 讨论(0)
  • 2021-01-25 00:00

    That project is a maven project. A simple way is clone that project into your machine, and import it as a maven project, with File - Import - Maven - Existing Maven Project.

    Eclipse will help you resolve the pom file and configure project and download necessary libs.

    0 讨论(0)
提交回复
热议问题