Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » moving from one computer to another(moving eclipse workspaces between machines)
moving from one computer to another [message #739567] Mon, 17 October 2011 16:01 Go to next message
nwbeeson is currently offline nwbeesonFriend
Messages: 3
Registered: October 2011
Junior Member
I want to move an Eclipse workspace from my work computer to my home computer. I need to program at home and at work on the same project. I need to do this each way every day.

I copy the workspace to a USB flash memory drive, carry it home in my pocket, copy the workspace to the hard drive on my home computer, start Eclipse, and choose File->SwitchWorkspace. The transported workspace can be found and opened, but no project is shown. I have to do a convoluted "import" within Eclipse to get to the project.

How do I do this in a straight forward manner?

How can I move a workspace from one computer to another easily and quickly?
----
The copied workspace on the USB flash memory drive is 400 time larger than the .java files. Why?

What is Eclipse doing that requires it to write 11,348 kb for every 20k? How can I prevent this? I want the MINIMUM amount of stuff necessary to transporting an Eclipse workspace from one computer to another.
Re: moving from one computer to another [message #739619 is a reply to message #739567] Mon, 17 October 2011 16:57 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 10/17/11 12:01 PM, nwbeeson wrote:
> I want to move an Eclipse workspace from my work computer to my home
> computer. I need to program at home and at work on the same project. I
> need to do this each way every day.
>
> I copy the workspace to a USB flash memory drive, carry it home in my
> pocket, copy the workspace to the hard drive on my home computer, start
> Eclipse, and choose File->SwitchWorkspace. The transported workspace can
> be found and opened, but no project is shown. I have to do a convoluted
> "import" within Eclipse to get to the project.
>
> How do I do this in a straight forward manner?
>
> How can I move a workspace from one computer to another easily and quickly?

You can't - Eclipse workspaces are not designed to be portable.
Projects, on the other hand, are.
My first recommendation would be to set up some kind of SCM repository
(cvs, subversion, git, etc) so you can check-in and check-out your code
no matter what computer you're working on. There are plenty of free or
cheap hosting options for those.
Another option is to use File > Export and File > Import to move your
project to and from the flash drive. But if you're doing that every day
it is fragile and subject to mistakes.
A third option is to set up your workspace on the flash drive - make it
live there permanently. Then you can open it on any computer into which
the flash drive is plugged, assuming it always has the same drive letter
assigned. The drive letter part is critical, since otherwise it looks to
Eclipse like the workspace has "moved" (which, as I said, isn't supported).

Eric
Re: moving from one computer to another [message #739660 is a reply to message #739619] Mon, 17 October 2011 18:00 Go to previous messageGo to next message
nwbeeson is currently offline nwbeesonFriend
Messages: 3
Registered: October 2011
Junior Member
Thank you.
Here is exactly how to do this from a friend who is an Eclipse expert.
1. Open Eclipse and switch to Workspace1 using
Switch To Workspace...
2. Check the projects in Workspace1
3. Switch to another workspace to make sure that Workspace1
is closed completely by Eclipse (Critical step!)
4. Quit Eclipse
5. Copy Workspace1 and name the copy Workspace2
6. Copy Workspace2 to a USB flash drive
7. Copy Workspace2 from the USB flash drive onto the hard disk
of a different computer
8. Open Eclipse on the new computer
9. Switch to Workspace2 using Switch To Workspace...

The projects open normally from Eclipse on any machine as though
that workspace had been there all along. The critical step seems
to be switching to another workspace before quitting Eclipse. If
you skip that step the copied and transferred workspace does not
open correctly.

[Updated on: Mon, 17 October 2011 23:25]

Report message to a moderator

Re: moving from one computer to another [message #739745 is a reply to message #739660] Mon, 17 October 2011 20:08 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 17-Oct-11 12:00, nwbeeson wrote:
> Thank you.
> How do I export a project?
> I just checked File->Export and there is nothing there that looks to me
> like "project".
> My choices are many, and I have tried three times with bad results.
> Could you be specific? What choices do I make in Export> What type of
> export? Which files? Just the *.java files? Or the entire project folder
> with the bin, src, .project, .metadate, .settings?
>
> *Exactly* how do I load it to reconstitute the project?

As long as your project is in a working state in your Eclipse workspace
(even if it's closed, that's okay), you can pick it up and carry it
as-is somewhere else.

Import by dropping it somewhere in your new filesystem, launch Eclipse
on the workspace you intend to use, choose File -> Import... -> General
-> Existing Projects into Workspace -> Next, then Browse to the root of
the project, select it, click OK, then, if it's a valid Eclipse project,
you should see it checked in a list of projects in this wizard. Click
Finish and you're there.

The metafiles (directories) for an Eclipse project are:
.project (the one required for the steps above to work)
.classpath
.settings (a subdirectory)

Hope this helps,

Russ
Re: moving from one computer to another [message #739855 is a reply to message #739745] Mon, 17 October 2011 23:26 Go to previous messageGo to next message
nwbeeson is currently offline nwbeesonFriend
Messages: 3
Registered: October 2011
Junior Member
Perfect. Thank you. This worked for me as did the other solution I posted.

I really appreciate the list of .files that are needed.

Re: moving from one computer to another [message #1861283 is a reply to message #739855] Tue, 03 October 2023 22:38 Go to previous messageGo to next message
mike sweger is currently offline mike swegerFriend
Messages: 4
Registered: July 2023
Junior Member
I'm in the process of upgrading to a new laptop since the old one doesn't work to well anymore and the Windows OS is old too.

I have about 4 Eclipse environments installed for Java, then C++, Modeling tools and the Eclipse installer for version 09-2023 via the desktop icons. All are up to date and have various projects.
I also have various plugins that I downloaded and installed and various Marketplace ones too.
Since this took a long time to configure it the way I want, I now need to migrate all of these Eclipse environments to the new computer laptop with Win10 instead of the old Win 8.1.

Is this possible to somehow zip up only the Eclipse stuff and then install it to the new computer without having to start from scratch again?
I could image the drive, but I can't tell the disk imaging software to only do the various Eclipse environments to do the migration. Since the laptop doesn't have raid, I can't do the disk copying that way either. Nor will disk backup utils do the job too. Although projects/workspaces etc could be synched to the MSoft cloud or other clouds such as Apple and then onto the new computer via the cloud syncing to it, the issue is the upload network speed is 8Mbps and download 100Mbps. This is ok for some data/program files, but I tried once to do this for 150 gigs of files and email archives and it was estimated to take 15 days just to upload it -hence this method was scrapped. Thus, cloud is ok, but for practicality reasons it is useless due to the max upload speed set by ISP's to the home for remote working. If I go to the office, the up/down speed is 10Mbps since everyone in the office is sharing the same router and thus wouldn't be that much faster.

Maybe this capability can be added to Eclipse for migration purposes so one could archive all Eclipse and copy to flash drive and then onto the new computer. Moreover, maybe have the ability to install the environments and projects/workspaces in their own virtual environment and the rest of the laptop in its own virtual environment or not. Then one could just copy the virtual environment to the new computer - WaLa! done....

Any ideas on the migration solution?

[Updated on: Tue, 03 October 2023 22:39]

Report message to a moderator

Re: moving from one computer to another [message #1861287 is a reply to message #1861283] Wed, 04 October 2023 06:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
If you copy things such that they have exactly the same drive and same path on that drive as before, you can probably copy the following from your home folder to the new (exact the same name) home folder:
.eclipse
.p2
and likewise do so for all your installations and workspaces. Identical drive and path. The .p2 contains the bundle pool used by all the installation. The .eclipse contains "global settings".


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: moving from one computer to another [message #1861297 is a reply to message #1861287] Wed, 04 October 2023 11:55 Go to previous messageGo to next message
mike sweger is currently offline mike swegerFriend
Messages: 4
Registered: July 2023
Junior Member
Ok, I'll try the dot files you mention and such to see what happens.

I was thinking maybe that an Eclipse tool similar to the MSoft media creation tool if developed could do the reinstall. It would copy the dot files you listed, projects/workspaces along with an [boostrap] executable that starts the process by redownloading the Eclipse software, plugins, using these files to know the current version and configuration of the environment. The tool would copy the registry entries too if needed that are unique. Once the Eclipse software is downloaded and installed like how the Win OS is done using media creation, the dot files are used to download the eclipse software, and plugins for the same version specified in them (dont what to update to i.e. a future/current version such as 10-2023 when one is on 09-2023, but once migrated one can start the update process).

The only thing left would maybe be all the external tools such as each of the Java library versions which were downloaded manually and installed, and various editors such as notepad++, gcc and other similar C/C++ compiler tools etc.
Re: moving from one computer to another [message #1861298 is a reply to message #1861297] Wed, 04 October 2023 12:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
There is nothing in the registry to worry about.

I personally pretty much never create installation manually. I always define an Oomph setup that creates what I need from scratch automatically.

https://wiki.eclipse.org/Eclipse_Oomph_Authoring

This was a life saver when I got my new computer two years ago, though I did have one horrible C/C++ environment that I had to carefully copy over because I never could figure out a portable way to configure it...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: moving from one computer to another [message #1861361 is a reply to message #1861287] Sun, 08 October 2023 17:56 Go to previous messageGo to next message
Monaliza Monaliza is currently offline Monaliza MonalizaFriend
Messages: 1
Registered: October 2023
Junior Member

Ed Merks wrote on Wed, 04 October 2023 06:04
If you copy things such that they have exactly the same drive and same path on that drive as before, you can probably copy the following from your home folder to the new (exact the same name) home folder:
.eclipse
.p2
and likewise do so for all your installations and workspaces. Identical drive and path. The .p2 contains the bundle pool used by all the installation. The .eclipse contains "global settings".


I don't think I have the patience to install it manually. Are there any other methods to shorten the time?

Re: moving from one computer to another [message #1861373 is a reply to message #1861361] Mon, 09 October 2023 15:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33107
Registered: July 2009
Senior Member
No, this is it.

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Unable to Access java.sql Package in JavaFX Project in Eclipse
Next Topic:Eclipse crash
Goto Forum:
  


Current Time: Tue Mar 19 09:01:09 GMT 2024

Powered by FUDForum. Page generated in 0.04130 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top