Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Moving Eclipse project

 
Caitlyn Spicer
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic