Last week I had the joy to add self-updating to one of our customers RCP-Application and well it turned out that this task only lasted for about 2 hours beside reading through the p2-Docs on the wiki and other online blogs which took me some more time.

To keep this post as short as it took me to add p2 to the 3.5 application. It simply worked out of the box. I’m now customizing and tweaking it here and there but I’m quite postive this will work out also smooth.

I’m sorry that p2 doesn’t solve your problem. I admit I’ve probably one of the most common use cases “Update my RCP-Application” and this one is handled perfectly by p2. I spend my working day today customzing it a bit because the default ui.sdk-Feature brought in the “Install New Software …”. Anyways my first encounter with p2 is positive.

Terminology: realizing that “Install New Software…” will not update your product anymore. It will simply fail with an error, and you might well think your p2 update site didn’t bake right until you figure out that product features will only update with “Check for Updates”. Doh! I understand that p2 introduces this lifecycle distinction between “install” and “update”, but it was very confusing at the time. Why doesn’t p2 filter the product feature out if it can’t install it? Or convert the operation to an update?

Edge case: A JRE bundled with a product feature’s rootFiles can’t overwrite on Windows when you try to update it, and the operation will fail. There is a workaround (put the JRE in a separate feature with a fixed version number, no qualifier), but it was not straightforward, and rather scary when I ran into it.

Overall though, I have to say our product build (p2 + Buckminster) and update site is leaps and bounds better (and faster) than our old headless PDE Build monster. The p2 director is a simple and effective tool for building your product.

Thanks on the “Install New Software …” and JRE informations. I haven’t tried that “Install New Software …” because I knew from the start that I will remove this entry from the Menu anyways and so I didn’t even bother to test.