This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
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 testTomcat's lib directory so I will have a portable definition that I can use to get the J2EE class definitions I need.
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.