Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Re: Can there be more than one application?
Re: Can there be more than one application? [message #88755] Mon, 28 May 2007 13:33 Go to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I've moved this over to equinox, since this is really they're area.

Steinar Bang wrote:
>
> I tried many variants over this, and to cut things short, this was
> what worked:
> 1. I'm using a different PDE target platform than the eclipse
> installation (its plugins directory contains the bundles of the
> eclipse runtime, plus the ones I've added). The PDE target
> platform is situated in $HOME/target_platform/
>
> 2. I copied the /usr/local/eclipse/configuration/config.ini file to
> $HOME/target_platform/configuration/config.ini
>
> 3. I modified $HOME/target_platform/configuration/config.ini and
> added the bundles I needed starting to the osgi.bundles value
>
> Note: what I put into osgi.bundles was bundle-symbolic-name@:start for
> all of my custom bundles. I tried putting the file name without
> version number and .jar (which is what the osgi.bundles in the
> config.ini of the standalone application have), but that didn't work.
>
> If there is interest, I can list the things I tried that didn't
> work...:-)
>
> But now I've run into a different problem... the standalone
> application defines a ParameterizedRunnable, and registers it with the
> OSGi framework.
>
> And the EclipseStarter and EclipseAppLauncher classes can only deal
> with a single ParameterizedRunnable...
>
> So now I'm pondering what to do...?


Also,
Steinar Bang wrote:
> Is it possible to start an eclipse/osgi application containing two
> ParameterizedRunnable implementations for two separate applications
> (one of which is eclipse RCP)?
>
> I'm trying to integrate parts of a standalone OSGi based application
> into the same VM as an RCP solution, and it's currently breaking
> because EclipseAppLauncher just seems to handle a single
> ParameterizedRunnable (it looks like it picks the first it finds).
>
> Is there some way to start eclipse that makes it pick more than one?
>
> Thanx!
>
>
> - Steinar


Re: Can there be more than one application? [message #90538 is a reply to message #88755] Wed, 13 June 2007 19:55 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
Take a look at
http://wiki.eclipse.org/index.php/Equinox_Application_Model_ Demo for an
application admin demo. This demonstrates how to launch multiple
applications at the same time.

You are correct that the EclipseAppLauncher can only handle running one
application at a time. This is because it is designed to only run
applications which specify that they *must* be run on the "main" thread.
Once an application is started on the main thread there is no way to
launch another one until the first application has ended and handed back
control of the main thread.

To run more than one application at a time you must use applications
that do not set cardinality=singleton-global and you can only use one
application which specifies thread=main in their
org.eclipse.core.runtime.applications extension. Unfortunately for
backwards compatibility both of these values are the defaults for the
org.eclipse.core.runtime.applications extensions.

Currently the workbench and many other parts of eclipse prevent you from
launching multiple RCP applications at the same time. This is because
they have lots of global statics that would not play nicely with multple
RCP applications. But you should be able to launch one workbench based
RCP application plus lots of other headless applications or non
workbench base applciations from the same instance of eclipse. That is
what the demo shows.

HTH

Tom
Previous Topic:Problem exporting plugins from PDE
Next Topic:Running plugin causes a NoClassDefFound error for IAdaptable
Goto Forum:
  


Current Time: Thu Apr 25 16:07:29 GMT 2024

Powered by FUDForum. Page generated in 0.03478 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top