Running Eclipse RCP applications in IntelliJ 9

I'm trying to translate my Eclipse RCP setup to Intellij 9's OSGI support.

I've got all the bundles declared in my Eclipse setup in my IntelliJ set up.  If I include MY bundle, I get the error:

java.lang.IllegalArgumentException: The System Bundle's start level can not be modified.
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.setBundleStartLevel(
    at org.eclipse.core.runtime.adaptor.EclipseStarter.installBundles(
    at org.eclipse.core.runtime.adaptor.EclipseStarter.loadBasicBundles(
    at org.eclipse.core.runtime.adaptor.EclipseStarter.access$1(
    at org.eclipse.core.runtime.adaptor.EclipseStarter$1.bundleChanged(
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(

I've tried changing the start level on my bundle from 1-5, but still with the same error.  Has anyone come across this?

1 comment
Comment actions Permalink

Hi Adam,

Your start configuration contains the bundle org.eclipse.osgi, which is the system bundle for Equinox.
Please remove it from the list of bundles to be installed.

Also note: Below the "Remove"-button on the bundles-page of the OSGi run configuration there is now a button labeled "Framework Specific". For Equinox it opens a menu with two actions. Each of this actions removes all framework instance bundles from the list and adds a specific selection of framework instance bundles to the list that makes sure RCP products or applications specified on the "Additional Framework Properties" page will start up just like they should.

Here's a small checklist in case some other errors come up (I really need to enhance the documentation and write at least one tutorial):
1. After importing your Eclipse workspace, make sure that "IntelliJ IDEA (.iml)" is set up as "Dependencies storage format" on File -> Project Structure -> Modules -> yourModule ->Dependencies
2. Remove the created global library ECLIPSE and all dependencies on it.
3. Define your Ecllipse target environment (often simply the Eclipse installation itself) as a framework instance in File -> Settings -> IDE Settings -> Framework Definitions
4. Set the framework instance used by th project to the newly created framework instance (File -> Settings -> OSGi -> Project Settings)
5. In  a "OSGi Bundles" run configuration set the framework instance to use to the newly created framework instance (Parameters -> OSGi Framework)
6. On "Additional Framework Properties" specifiy the product or application to run. If the plugin.xml of the plugin "com.acme.rcp" contains the definition of a product "prod" then the name of the product to specifiy here is ""
7. Add all of your bundles that are needed to run the product on "Bundles"
8. Execute one of the actions in the menu of the button "Framework Specific"
9. Start the run configuration
10. If you are using a Mac, you will be warned to add "-XstartOnFirstThread" to the JVM options. You'll need to do it. Otherwise SWT won't run.

Best regards,


Please sign in to leave a comment.