19

The Project Explorer is able to list all projects in Eclipse. I am wondering where the project information gets stored?

rajah9
  • 11,645
  • 5
  • 44
  • 57
user496949
  • 83,087
  • 147
  • 309
  • 426

7 Answers7

41

The projects can be found under the .metadata directory of your workspace:

[eclipse-workspace]/.metadata/.plugins/org.eclipse.core.resources/.projects

Each project contains a .location file (in binary format) which presumably tells eclipse where the project is located on the filesystem, if it has been imported.

dogbane
  • 266,786
  • 75
  • 396
  • 414
  • 2
    Any idea how to parse the binary `.location` file? Do you know the location of the source file that does the parsing? – Lucas Apr 30 '13 at 13:12
  • 3
    File may be binary, but I have opened it with Notepad++ and saw location of the project in plain text. I changed it and it worked. – Amomum Jan 23 '14 at 16:24
  • See [here](https://stackoverflow.com/a/33831466/1089967) where I'm able to parse the paths from the `.location` files – lance-java Jun 09 '17 at 12:40
  • Here on my system the .metadata directory is almost empty. It does not contain a .plugins directory. – Regis May Aug 26 '21 at 07:49
6

In Windows, usually C:\Users\%USERNAME%\workspace

Where %USERNAME% is the username given to your computer. eg. john

You can paste the above path in Run(Windows + R) window and it will pick the username automatically for you though.

Lucky
  • 16,787
  • 19
  • 117
  • 151
  • Instead of `your computer name`, it should be `your username`. – Jesse Apr 30 '13 at 15:39
  • @Jesse It should rather be `%USERNAME%` as windows will automatically pick the value of the current user for you. – Lucky Oct 20 '15 at 13:58
6

By default projects in Eclipse are stored under your workspace. You get asked where your workspace is created or which one to open whenever you open Eclipse, but you can configure it to not ask you again.

If you configured Eclipse not to ask again, then you can go to General -> Startup and Shutdown -> Workspaces in your preferences and check "Prompt for workspace on startup".

That page also lists your recently used workspaces (with probably just 1 entry, if you never explicitly specified a different one).

Note that you can also create projects that are located outside of your workspace, by explicitly specifying a separate location per-project.

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
  • I wonder.. Do you also know where, in the .metadata folder of the workspace, the info concerning the projects is stored ? – Dunaril Feb 25 '11 at 15:34
  • @Dunaril: everywhere! What specifically are you looking for? Each plugin has its each subdirectory in there. – Joachim Sauer Feb 25 '11 at 15:35
  • I was looking for generic Eclipse info (like the list of projects along with their names, the workings sets they are part of, the state of the Project Explorer..) – Dunaril Feb 25 '11 at 15:53
6

Browse over to your workspace folder. You will see a folder for each project.

(Don't know where your workspace folder is? Try File -> Switch workspace... and it will give you the path.)

rajah9
  • 11,645
  • 5
  • 44
  • 57
2

For Eclipse Kepler SR2 on Windows 7

The easiest way to retrieve general info about a project (e.g., its location), see the following:

  1. go to your "Package Explorer" view;
  2. right-click on your project top-hierarchy folder;
  3. choose "Show In" -> "Properties";

and you'll get the list of properties for that project in the "Properties view". Location of project will be in there.

CptAmerica
  • 21
  • 2
0

On a Windows PC, you should be able to find your projects under C:\Users\yourname\workspace\. If you're on Linux, it should be under /home/yourname/workspace/.

It's Willem
  • 656
  • 3
  • 8
  • 15
0

I used the "Try File -> Switch workspace" suggestion which works but also re-installed Eclipse 0_0

Eddy Zavala
  • 549
  • 1
  • 4
  • 12