Eclipse RCP product icons and Maven Tycho

Last time I encountered some problems with application launcher icons when building my RCP application with Maven Tycho.

I got a FileNotFound Exception during product build for the Linux XPM-icon file. For a windows build I got a build-warning: “Error – 7 icon not replaced in …”.

Stackoverflow led me to a post that says something about the icons sizes for Windows launchers [1]. According to this, the following sizes are expected:

For Eclipse 3.7.2:

  • 48×48 8 bit (256 colors)
  • 32×32 8 bit
  • 24×24 8 bit
  • 16×16 8 bit
  • 48×48 32 bit (RGB + Alpha)
  • 32×32 32 bit
  • 16×16 32 bit

For Eclipse 4.2:

  • 256×256, 32 bit (RGB / Alpha Channel)
  • 48×48, 32 bit (RGB / Alpha Channel)
  • 32×32, 32 bit (RGB / Alpha Channel)
  • 16×16, 32 bit (RGB / Alpha Channel)
  • 48×48, 8 bit (256 colors)
  • 32×32, 8 bit (256 colors)
  • 16×16, 8 bit (256 colors)

I use The Gimp to create the ico files. But it is also possible to do an automatic conversion under Linux using ImageMagick and icotools. For this there is a tutorial here [2].

Furthermore you have to take care about the launcher file path in the product definition file. It mustn’t start with a slash, otherwise you will get a FileNotFound Exception during product build for the Linux XPM-icon file.

[1] http://stackoverflow.com/questions/10999323/error-in-tycho-while-replacing-the-product-ico-files

[2] http://tomsondev.bestsolution.at/2007/06/26/branding-for-windows-how-to-create-ico-files-automatically/

Hallo World!

Welcome to the Data In Motion Tech Blog. Here we will present code snippets and tricks regarding the topics Eclipse, OSGi, Gyrex, E4 and Java that hopefully will be interesting to you, too.

Through our daily work, we stumble upon a lot of interesting technologies and develop heaps of code worth sharing. Thus we have decided to spread our wisdom, in the hope to find other interested souls.

Happy reading,

your Data In Motion Development Team.