Eclipse: Error ".. overlaps the location of another project.." when trying to create new project

Viewed 121094

I keep getting an error message in Eclipse when creating a new project.

I have created a workspace at the level

C:\Users\Martin\Java\Counter

Inside Counter there are no files but there is a directory called counter_src which contains source files for the project Counter

So in Eclipse I do, New Java Project, and then uncheck default location and choose the directory

counter_src (which is one level down from Counter)

but it now displays

C:\Users\Martin\Java\Counter\counter_src overlaps the location of another project: 'counter_src'

Now if I create my workspace at

C:\Users\Martin\Java\

which means my counter_src is actually 2 levels down then it allows me, but the problem is that the directory Java contains lots of projects so I wanted to create the workspace in Counter (which has no files) which has subdirectory of counter_src where my source files are.

Also tested creating directory in C:\Users\Martin\Java\ and it appears to work also but I didn't want to create another subdirectory in "C:\Users\Martin\Java\" just to store my workspace for 1 project.

12 Answers

I got this error when trying to create a new Eclipse project inside a newly cloned Git repo folder.

This worked for me:

1) clone the Git repo (in my case it was to a subfolder of the Eclipse default workspace)

2) create the new Eclipse project in the default workspace (one level above the cloned Git repo folder)

3) export the new Eclipse project from the default workspace to the cloned repo directory:

a) right click on project --> Export --> General --> File System
b) select the new Eclipse project
c) set the destination directory to export to (as the Git repo folder)

4) remove the Eclipse project form the workspace (because it's still the one that uses the default workspace)

right click on project and select "Delete"

5) open the exported Eclipse project from inside the Git repo directory

a) File --> Open Project from File System or Archive
b) set the "Import source" folder as the Git repo folder
c) check the project to import (that you just exported there)

this may not solve OP's question, but its relavent

Given::

Lets say you have an existing project in Eclipse,

call ProjectA, in path G:\wsp\eclipse\ProjectA

Problem::

You want to rename the folder name G:\wsp\eclipse\ProjectA of the project to be G:\wsp\eclipse\FolderB;

while keeping the project name ProjectA as it was.

  • if you directly modify the folder name && delete & re-import that project back into Eclipse;

    then you probably get some buggy behavior (-- you cant find the project / import that project properly).

  • if you press alt shift v -- move (refactor) the project;

    then you get the error overlaps the location of another project.

Solution::

  1. F2 > rename the project to be FolderB

  2. alt shift v > move (refactor) the project to path G:\wsp\eclipse\FolderB

    • [here, the error of overlap will not present if you have those 2 names to be the same]

      (and now, you successfully renamed the folder name.)

  3. F2 > rename the project back to be ProjectA

Related