Import Java project from GitHub to Eclipse

后端 未结 2 613
深忆病人
深忆病人 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.

提交回复
热议问题