127

I use Eclipse with "external" projects - i.e. projects created from existing source.

Poking around in the workspace files, I cannot find any reference to these projects. My question is: how does Eclipse keep track of these projects?

I'd like to be able to add such a project to the workspace automatically (by generating .project and .classpath files).

1

6 Answers 6

158

Windows:

<workspace>\.metadata\.plugins\org.eclipse.core.resources\.projects\ 

Linux / osx:

<workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/ 

Your project can exist outside the workspace, but all Eclipse-specific metadata are stored in that org.eclipse.core.resources\.projects directory As noted in the comments by tk421storm, and in Jeegar Patel's answer:

In order for manual changes to take effect, make sure to do File -> Refresh afterwards.

Sign up to request clarification or add additional context in comments.

5 Comments

@RoboAlex I usually don't edit it directly, but add or remove projects from the Eclipse workspace.
The last path is .projects on my system (Mint 16); is it different on Windows?
@WChargin not sure, maybe it has changed more than 5 years later. Which Eclipse version are you using on Mint?
from Jeegar's answer below, in order for manual changes to take effect, make sure to do File -> Refresh afterwards.
@tk421storm Good point, thank you. I have included your comment in the answer for more visibility.
13

In Mac OS X, it is under

<workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects 

Comments

9

In Eclipse 3.3:

It's installed under your Eclipse workspace. Something like:

.metadata\.plugins\org.eclipse.core.resources\.projects\ 

within your workspace folder.

Under that folder is one folder per project. There's a file in there called .location, but it's binary.

So it looks like you can't do what you want, without interacting w/ Eclipse programmatically.

1 Comment

+1 for the pointer to .location. In my case, the workspace folder had not changed, but the (different) location where the projects lived: different drive letter. I ended up fixing these files in place with (D:->F:) sfk replace -pat -binary _5552492F2F66696C653A2F443A2F_5552492F2F66696C653A2F463A2F_ -dir .metadata\.plugins\org.eclipse.core.resources\.projects -file .location
3

If you are using Perforce (imported the project as a Perforce project), then .cproject and .project will be located under the root of the PERFORCE project, not on the workspace folder.

Comments

1

In Linux after deleting

<workspace>\.metadata\.plugins\org.eclipse.core.resources\.projects\ 

Does not worked.

After that i have done File->Refresh

Then it cleared all old project listed from eclipse.

Comments

0

You can also have several workspaces - so you can connect to one and have set "A" of projects - and then connect to a different set when ever you like.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.