One of the most important tips I have for beginning RCP developers is to please, please, please set up a custom target platform for your applications. As a trainer, it’s one of the first things I have students do. This is because target platforms are central to many other things we do as RCP developers, including the management of launch and product configurations.
A target platform is simply the set of base plug-ins on which your application depends. By default, this target is set to be the entire collection of plug-ins shipped with Eclipse itself. So the first reason to set up a custom target platform is that the default is just messy. Why have hundreds of plug-ins in your target platform when you only need 20 or 30?
So setting up a target platform satisfies my sometimes excessive need for cleanliness, but there are other reasons as well. The best reason is that it decouples your application from the Eclipse development environment. Consider the following scenarios:
- You’d like to upgrade your Eclipse development environment to a milestone release, but you don’t want your RCP application to depend on beta plug-ins.
- You want to add GEF, EMF, BIRT or whatever to your application, but you don’t want to add it to your development environment.
In both cases, you’re out of luck if you’ve left your target platform defaulted to your Eclipse install. So save yourself some future headaches and set up a custom target platform.


Paul,
Thanks for this post. It could not have come at a better time.
I am currently working on an RCP Application with a team of developers. We are in the initial stages when we happened upon your blog post. I am convinced that the creation of a target platform is critical to the life of an RCP Application.
Now that we have that established, I was wondering if you knew of a good way to create an initial target platform. I went ahead and manually a folder and placed all of the necessary RCP Binaries into that folder. I was hoping that there would be a way to do this more automatically, but I could not find anything.
Also, what is the best way to share the target platform with other developers. One of the main reasons why I put the plugins manually into a seperate folder is so that we can then version control the Target Platform in Subversion.
Is there a better approach for the above two methods?
Thanks in advance for your response.
Carlus
Hi Carlus,
Good to hear from you! I don’t know of any easier way to create a target platform than the one you describe. But downloading and zipping the file isn’t too difficult! You then will need to add at least the JUnit plug-in if you want to do unit testing.
As for sharing it, I’d definitely consider placing the platform on a shared drive. It’s also nice to have a wiki page listing the plug-ins needed for each application. And versioning the target platform is a *great* idea.
I’m actually preparing a post on target platform best-practices for next week, so keep watching for that.
— Patrick
I am also starting out in using Eclipse RCP.
I found a tutorial where the target platform and the entire build until the deployable program can be created automatically using the Buckminster tool.
http://www.ralfebert.de/blog/eclipsercp/rcp_builds/
One drawback in my experience is that the learning curve for Buckminster is pretty steep.
There’s a pretty easy way to build a target platform in almost automatic manner.
1.) Create a launch configuration for your plugins
2.) Create a feature project out of your launch configuration (the feature proj creation wizard asks you whether you want to)
3.) Add the platform specific flavors of SWT, filesyste, etc. (your launch config most probably only includes swt for your OS, filesystem for your OS, etc.)
4.) Export your feature as Deployable Feature
5.) Merge the platform specific plugins- and feature-folders (PDE put them in separate folders for Win32, Linux, MacOS, etc.)
6.) Create a target platform for these folders
Worked pretty well for me.
Cheers
André