If you get an error like this:
!ENTRY org.eclipse.osgi 4 0 2009-06-09 23:06:24.578
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
While you are trying to run an headless Eclipse like this:
<java classname=“org.eclipse.equinox.launcher.Main“ classpath=“${proj.root}/${internal.targetplatforms}/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar“ fork=“true“ dir=“.“ failonerror=“yes“ timeout=“7200000″ outputproperty=“__era.eclipse.output“ logerror=“true“>
<jvmarg line=“@{jvmarg}“ />
<arg line=“-data @{workspace}“ />
<arg line=“-configuration @{configuration}“ />
<arg line=“-install ${proj.root}/${internal.targetplatforms}/“ />
<arg line=“-application @{application}“ />
<args />
<sysproperties />
</java>
The solution is to provide the „-initialize“ command like this:
<java classname=“org.eclipse.equinox.launcher.Main“ classpath=“${proj.root}/${internal.targetplatforms}/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar“ fork=“true“ dir=“.“ failonerror=“yes“ timeout=“7200000″ outputproperty=“__era.eclipse.output“ logerror=“true“>
<jvmarg line=“@{jvmarg}“ />
<arg line=“-initialize“ />
<arg line=“-data @{workspace}“ />
<arg line=“-configuration @{configuration}“ />
<arg line=“-install ${proj.root}/${internal.targetplatforms}/“ />
<arg line=“-application @{application}“ />
<args />
<sysproperties />