How to Change Eclipse Default workspace using UI and Command Line

By Arvind Rai, February 23, 2016
On this page we will provide how to change eclipse default workspace using UI and command line. Eclipse workspace is a directory which stores the projects and complete state of our IDE at a given time. The source code of project is by default saved in workspace. Eclipse always uses workspace to work. When we start eclipse, it starts with a default workspace which can be changed later. We can change workspace using eclipse UI as well as command line. Here we will discuss both approach step wise.

Using "Switch Workspace" from Eclipse File Menu

Find the steps to change the eclipse workspace using "Switch Workspace".

Step 1: First open the eclipse in its default workspace.

Step 2: Go to menu File -> Switch Workspace -> Other. We will get the UI as below.
How to Change Eclipse Default workspace using UI and Command Line


Step 3: Click on Browse button and configure the required location. When we press on OK button, eclipse will restart and workspace will be changed.

Using Command Line

Workspace can also be changed using command line. Here we are giving demo using Window 7 OS. Find the steps.

Step 1: Open the command line and go to eclipse home.

Step 2: Suppose we want to set our eclipse workspace as D:\test. Now run the command as follows.

>eclipse -data D:\test

In using command line, the good thing is that we do not need to open eclipse to change workspace. After running command eclipse will open automatically in changed workspace.

Change Project Default Location

When we create a project in eclipse, we can change the location project wise. By default project location is current workspace of eclipse.

Step 1: Go to File -> New -> Other ->. Select a project. For demo we are using Java Project. We will get the UI as given below.
How to Change Eclipse Default workspace using UI and Command Line
Step 2: To change the default project location, uncheck Use default location and browse the required location.
POSTED BY
ARVIND RAI
ARVIND RAI
LEARN MORE








©2024 concretepage.com | Privacy Policy | Contact Us