This is a question which is frequently asked in the Tycho community:
I want to build an Eclipse distribution/RCP application with Tycho.
To do this, I have created an eclipse-repository
project with a product file which specifies the features to be included. Then, I have configured the tycho-p2-director-plugin to create an installation of the product.
The build runs fine, but the installation fails to start up. The log contains the following error:
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
I vaguely remember that I need to tell Eclipse how to bootstrap, but I don't know what configuration I need exactly. Is there a configuration that will work with most Eclipse installations? Or can I somehow copy the configuration from a working Eclipse installation?
Here’s the product from my E4 beginner’s guide book:
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4"/>
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1"/>
Those are the ones that you will need to get running for the product in most cases.
The simpleconfigurator is the bundle responsible for reading the bundles.info and bringing everything up - essentially pre-filling the bundles and restoring the started/running state.
The ds bundle starts declarative services (which more bundles are using).
The equinox.common provides the IAdapterManager service and registers the platform: URL handler (so bundles can refer to content like platform:/org.eclipse.equinox.common/about.html
).
The core.runtime provides the preference service and the preference store.
Hope that helps!
In the Configuration tab of the Product Editor, there is a section labeled "Start Levels". Click the Add Recommended... button in order to set the settings which will solve named problem.