Eclipse, for any Java developer, is a tool that is almost as essential for developing Java application as the Java docs itself. The compiler even. With its huge plug-in set and ability to do almost anything you want automatically, it is no surprise why you will probably find this IDE in where where Java is developed.

Then you start using it. One of my main complaints about Eclipse is that there is no way to export the color scheme in use without exporting with it other computer-specific settings. I don’t want to export which specific JRE location to use because it won’t be the same on a Mac and Windows. Nor do I want to export other settings, probably having to do with plugi-ns installed. And I especially don’t want another user’s recently used workspace locations. So what do you do?

I spent some of my day today getting Eclipse set up to use a color scheme that I like, but every time I downloaded someone’s exported Eclipse preferences, which includes color scheme, importing it would not only import their color scheme but other settings that I don’t care for. After much googling, I came across two solutions:

  1. Copying the specific files used for the color scheme.

This was a very good solution, however this depends on having access to either the person who has the color scheme installed that you like, or their computer. I did not want to email the guy and wait for a response so I continued looking. I came across the solution I’ve been looking for

  1. Given any Eclipse preference export, sanitize the file before importing it into your instance of Eclipse.

This is the method I used to clean the Eclipse preference file. It ran without a hitch. Just copy/paste the “epf-to-colorscheme” script into a new file, chmod it executable, and run it like this, presuming you name the file sanitize.sh and you have an Eclipse preference export file named eclipse.epf:

./sanitize.sh eclipse.epf

A new file will be created called eclipse_color.epf containing only the color scheme-specific lines.