I would like to start an OSGI framework that does not start the E4Application right away. Rather, I would like to start it later with ApplicationDescriptor.launch(...).
Currently I am running a product with
and in the workbench. With these options I can start the E4Application from the console by typing
-Dosgi.noShutdown=true -Declipse.application.launchDefault=false -Declipse.allowAppRelaunch=true
and things work as expected.
osgi> startApp org.eclipse.e4.ui.workbench.swt.E4Application
However, when I get the ApplicationDescriptor in some OSGi service and try to launch the E4Application with
I get the following exception
org.osgi.service.application.ApplicationException: The main thread is not available to launch the application: org.eclipse.e4.ui.workbench.swt.E4Application.0
What am I missing here?