This is a fair criticism. The information for how to do this is in the
doc but we have not made it particularly accessible. Let me spell it out
a bit here and give you some doc pointers.
Say you have bundles B1 and B2 that you want to have installed and started
on startup. Of course you can run
java -jar org.eclipse.osgi_3.1.0.jar -console
and then install and start B1 and B2 using the console as you would in
other OSGi systems (note that the console commands might be slightly
different).
If you want something automated then create a config.ini that lists B1 and
B2 as bundles to be installed and started. Think of the Eclipse
"configurations" as roughly equivalent to Oscar "profiles". (Note that I
have only read the Oscar doc but superficially they appear to be in the
same space). Set up something like
somedir/
org.eclipse.osgi_3.1.0.jar
configuration/
config.ini
Where config.ini is a properties file with the following
osgi.bundles=B1:start, B2:start
Note there is way more power in this property, see the doc for details.
Then when you start Eclipse OSGi using the command line above, B1 and B2
are installed and started. If you want to specify a different
configuration just add -configuration <location> to the command line. For
more information on the set of command-line args and system properties
available to set things up, see
http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
and more generally
http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/reference/misc/index.html
Now, if you want to make things even easier, you can add in a few Eclipse
bundles (i.e., org.eclipse.core.runtime and
org.eclipse.update.configurator). This gives you an application model,
automatic bundle discovery/install, extension registry, ... That is a
topic for another discussion.
For those who are interested in some of the Eclipse extensions to OSGi,
see
http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html
Most of these facilities are experimental. Some general and we will
propose for OSGi R5, others are Eclipse-specific. All were put in place
to solve real problems that we (or our consumers) were having. You may be
having related problems.
Enjoy
Jeff
p.s., The JavaDoc for EclipseStarter seems to in fact be missing from the
3.1 API reference documentation. Sigh. I have entered
https://bugs.eclipse.org/bugs/show_bug.cgi?id=106304
to track that issue. Thanks for pointing it out.
Niclas Hedhman <[EMAIL PROTECTED]>
08/05/2005 12:37 PM
Please respond to
oscar-dev
To
[email protected]
cc
Subject
Re: Oscar, please meet Eclipse
On Friday 05 August 2005 17:41, Marcel Offermans wrote:
> I've looked at the link you provided, I've tried
> searching the whole Eclipse site, I've tried searching the Eclipse 3.1
help
> files, but I cannot find any API documentation on the EclipseStarter
class
> which I need to launch the framework. I want to configure it to start
some
> bundles from code.
Yes, this is indeed the weakest point in the Eclipse OSGi offering.
Even when I know it is there, and actively trying to get to it, it eludes
me.
I think some of that is due to the "global" aspect of the entire Eclipse
project, which sometimes is really good, and like now can bite back pretty
nasty.
Cheers
Niclas