Where is "create project from existing source" in eclipse Indigo?

23,837

Solution 1

Un-check the Use Default Location option and then Browse to select the parent folder of your existing source tree. Eclipse will automatically detect the existing files and folders, although you might have to configure the project to let it know what your source folder is; but the New Java Project wizard presents that option to you.

Solution 2

If your source directory is inside the current workspace, ERiz's answer won't work due to a bug in Eclipse. (It prints out the error "folder overlaps the location of an existing project"). Instead, you should leave Use Default Location checked and type in the name of the folder as your project name.

See here for more discussion about the problem.

Solution 3

So far it seems the only way to do this is the solution Antimony suggested.

If you want to avoid typing in the folder name, untick "Use default location", select your source directory, then tick "Use default location" again and the Project name field should contain the name of the source directory.

Solution 4

I came across this answer trying to import a Git project, so I will write my solution here. The workspace directory is the same as the Git's working directory, so I didn't want to move the project folder somewhere else.

If you have a Git project you want to import, but Eclipse can't see it because it has not the .project file in its directory, here's the steps:

  1. File > New > Java Project: put in the name the name of the project's dir, so as Antimony said, the project will be automatically configured.
  2. You will see your project in the Project list, but it's not bound to Git yet.
  3. If it's a maven project, you can convert it to maven project now: right click on the project and select Configure > Convert to Maven project.
  4. Delete the project (DO NOT SELECT "Delete project from disk")
  5. Now you can import the project as a Git project from File > Import > Git Project
Share:
23,837
Morison
Author by

Morison

Updated on January 12, 2020

Comments

  • Morison
    Morison over 4 years

    I cannot find "create project from existing source" in Eclipse Indigo while I am trying to create a "java project". When I select Java project and then next window comes up with options- User default location, JRE, Project layout, and Working sets.

    I couldn't find a clue while searching for any possible change in UI of Indigo. Where can I find "create project from existing source" in Indigo?

  • Antimony
    Antimony almost 12 years
    Eclipse complains that the folder overlaps the location of an existing project (even though it's just a plain source tree) and refuses to proceed.
  • E-Riz
    E-Riz almost 12 years
    That's not a bug, it's how Eclipse workspaces work. Eclipse won't let you nest a project inside another project, so trying to create a project under another in your workspace isn't allowed.
  • ccoutinho
    ccoutinho over 9 years
    This fixed the problem for me, but it's funny that it didn't allow me to place the files inside the Default Location. Had to place them somewhere else in order to do this