2.13. Using a Different Workspace
Problem
You want to use a nondefault workspace for an Eclipse project.
Solution
Uncheck the “Use default” checkbox when you name the project in the first pane of the New Project dialog, and fill in the directory you want to use instead.
Discussion
When you create a new Eclipse project, Eclipse stores it in its workspace directory by default. You can, however, make it use another directory, regardless of the type of Eclipse project you’re creating. To select a different location, uncheck the “Use default” checkbox when you name the new project in the first pane of the New Project dialog. Then fill in the directory you want to use instead.
You can see how this works in Figure 2-11, in which
a new Java project is created and stored in the directory
c:\myworkspace.

Figure 2-11. Creating a custom workspace
Using a nondefault workspace is a good idea in many cases. For
example, you might be working with code on a network. In this case,
you should store the code where other software can use it (in Chapter 8, we’re going to store and
develop code where the Tomcat web server can find it, which means
using the Tomcat installation’s
webapps directory as the workspace).
It’s also a good idea to use a nondefault workspace
if you want to keep some software, as in a beta version
you’re developing, separate from the current version
of the software.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access