How to migrate preferences of one Eclipse workspace to another?

When you switch to a new workspace for the same project in Eclipse you generally have a lot of work to do before you start import or creating projects. This work majorly involves setting of preferences and other settings to your new workspace. This sometimes becomes painful and tiresome especially if you have a lot or project specific preferences to be applied to the workspace or have customized many of the default ones.

Also, it is many a times, error prone since you might forget some preferences and end up factoring why your code is not behaving the same way as it used to in your earlier workspace.

The secret to make this easier is to find out where does eclipse store this settings and thankfully it is easy enough. Eclipse stores all preferences in text format, properly separated for each individual plugin. So, migrating the settings from one workspace to another is just simple, copy-paste the setting files.

The location where the preferences are kept is :
<workspace_location>\.metadata\.plugins\ org.eclipse.core.runtime\.settings


Check the folder and try to see what is within each file and you will see all your plugin settings in it.

So what you would need to do is to copy org.eclipse.core.runtime folder and paste it in your other workspace inside \.metadata\.plugins. Do not copy any other folder or else it may lead to some unusual workspace behavior.

If you want to transfer only the preference for a particular plugin then you just need to copy that individual file alone, from within this folder.

Action Steps:

  • Switch your existing workspace to a temporary workspace.
  • Close eclipse
  • Copy the above folder and start eclipse with the temporary workspace
  • Now check all your earlier settings will be reflected

Simple, isn’t it? Let me know if it worked for you.

9 thoughts on “How to migrate preferences of one Eclipse workspace to another?

  1. This works limited to the default preferences only. I tried to use this pass the RSE settings &profiles but wasn’t successful.

    Yes, default settings worked great!

  2. @Ensafi – I did try the preferences in File|Export menu but it does not work in a foolproof manner.

    For example, I had set some Maven custom settings. But with the export option it did not work.

    But with the above technique all settings got migrated.

  3. Just want to notice the somebody Ensafi’s way didnt properly work for me at least,
    But original article’s author has saved a lot of my time.
    Many thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *