Amil
Amil

Reputation: 609

Moving Eclipse Workspace from ~ to new directory?

Okay, so I made a mistake of setting my home directory (~, a.k.a. /home/user) to be my workspace location on my RHEL6 box.

I want to change my workspace to ~/workspace. However, I can't seem to do this by copying files. For some background, the project I am currently working on and have fully set up under the ~ workspace, has all source files stored elsewhere (~/depot/.../../../../src), so I don't even see a folder in ~ representing my project.

Upvotes: 39

Views: 59201

Answers (6)

SBMVNO
SBMVNO

Reputation: 642

I got the same problem. At the beginning, I installed everything under c:\eclipse including java , tomcat and workspace (for example, c:\eclipse\java etc) Below are the steps that I moved my eclipse from C Drive to D Drive.

[1] copy c:\eclipse d:\eclipse
[2] start the eclipse on the D drive
[3] switch the workspace (Reference: How to change the Eclipse default workspace?)
[4] change the java(s) used by eclipse on the d drive. (Reference: How to change JDK version for an Eclipse project)
[5] Change the tomcat location in eclipse (Reference : https://www.codejava.net/servers/tomcat/how-to-change-server-location-and-deploy-path-for-tomcat-in-eclipsen)
[6] Remove the c:\eclipse

Upvotes: 0

Guru
Guru

Reputation: 2857

  1. Close Eclipse.
  2. Open the location of the workspace and cut paste the entire directory (which contains the ".metadata" directory into the intended location.
  3. Restart Eclipse with newly copied folder as the workspace (parent directory of ".metadata" folder).

Upvotes: 2

Beginner
Beginner

Reputation: 1

I was testing to move files manually from workspace and suddenly my eclipse did not show them in my eclipse view so i moved them back to the same location where they have come from, entered eclipse and clicked right click on the package where i am expecting those files and clicked Refresh, Now i can view them on my Eclipse under packages, so try do refreshing it might work for u.

Upvotes: 0

Svetoslav Marinov
Svetoslav Marinov

Reputation: 1546

On Windows 8 I did this:

  1. Closed All of the projects in Eclipse
  2. Closed Eclipse
  3. Physically moved the workspace folder to a new location (in my case I put it into c:\projects as I have this backed up).
  4. Started Eclipse
  5. File > Switch Workspace and selected the new path. Then eclipse restarted itself and all projects showed up.

Upvotes: 18

Nendrel
Nendrel

Reputation: 83

After closing Eclipse projects and Eclipse itself, move all project folders and .metadata folder in the new workspace folder.

Upvotes: 3

niculare
niculare

Reputation: 3687

Do the following steps:

  • close all the projects in workspace
  • close Eclipse
  • move the directory .metadata from ~ to ~/workspace
  • open Eclipse and when prompted for the workspace selection set it to ~/workspace

Upvotes: 64

Related Questions