File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Moving Eclipse project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Moving Eclipse project" Watch "Moving Eclipse project" New topic

Moving Eclipse project

Caitlyn Spicer

Joined: Apr 08, 2013
Posts: 2
I started my project on my laptop, but now I want to continue on my desktop where I have 2 monitors. What do I have to do to archive the project on the laptop and re-open it on the desktop?
Greg Charles

Joined: Oct 01, 2001
Posts: 2968

The thing about Eclipse is that it uses absolute paths in some of its configuration files. If the path on your laptop and desktop will be the same, it should be enough to zip up the workspace folder and unzip to your desktop. That assumes the project files are contained within your workspace folder, which is how I usually do it. If the paths will be different, then you'll have to import the project into your new workspace.

Certain settings may be stored in your user space, but I've never got a good handle on which ones. It would be a good idea to go into your Preferences and make sure that the JDK you want to use is correct, and versions of other third party stuff like Ant or Maven. You'll also have to configure your desktop Eclipse with any plugins you added to your laptop Eclipse. Those aren't part of the workspace either.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Greg Charles wrote:The thing about Eclipse is that it uses absolute paths in some of its configuration files.

Not if you set up your project properly.

To move your project, use the navigator view's Export feature. You can export to an archive such as a ZIP file, or even copy the project directory wholesale to a LAN share.

On the desktop, use the Import feature. This will create a new Eclipse project on the desktop machine and copy the exported files into it.

If you do have non-portable elements in your project, this is the point where you'll fix them. Otherwise you are good to go.

If you want to be able to export/import at will and your project isn't portable, you can define symbolic locations for the non-portable external resource. For example, I have a TOMCAT_LIBS definition in Eclipse for my test Tomcat's lib directory so I will have a portable definition that I can use to get the J2EE class definitions I need.
Greg Charles

Joined: Oct 01, 2001
Posts: 2968

I stand corrected. I've scanned through project files for the project I'm currently working on and there's not a single absolute path in there. I know there were when I first took over the project though, which is when I decided that must be an Eclipse thing. I've simplified the setup quite a bit since then to make it easier to bring on new developers, so that may have something to do with it.
I agree. Here's the link:
subject: Moving Eclipse project
It's not a secret anymore!