[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Re: How to use launcher.jar in 3.3.0-M7?

Thomas Watson <tjwatson@xxxxxxxxxx> writes:

> With that said I'm not sure the equinox.launcher is well suited for
> the embedded usecase anyway.  The equinox.launcher sets up its own
> classloader for the osgi framework which will be inaccessible from
> your "outer" application which is embedding equinox.  By default the
> framework classloader created by equinox.launcher uses the boot
> classloader as its parent so it will be completely disconnected from
> your applications classloader.

I don't understand the significance of the difference here. Are you
suggesting that in the "embedded" arrangement I'm using now that my
application class loader can access parts of the OSGi framework? So
far the only sort of connection I've been able to establish is passing
my own "endSplashHandler" to EclipseStarter.start(). What would I be
missing out on with the launcher's class loader arrangement?


My motivation for looking for an alternative to the "embedded"
arrangement pertains to this problem:

  How to use ext[t]ension bundle and adaptor hooks?
  http://www.nabble.com/How-to-use-exttension-bundle-and-adaptor-hooks--t3199114.html

That is, without the launcher JAR, I can't make my program start up
properly without manually configuring the class path to include my
adaptor hook bundles. That proves to be somewhat onerous, as some
other developers -- and, eventually, users -- don't want to bother
with setting up a script to do the dirty work.

It's alluring that the launcher JAR takes care of this class path
construction automatically. In my current wrapping of EclipseStarter,
I set the EclipseStarter.PROP_EXTENSIONS property to point to my
adaptor hook JAR, but of course it's not automatically put on the
class path and hence not loaded as desired.

-- 
Steven E. Harris