2008/6/13 Mathieu Plourde <[EMAIL PROTECTED]>:

> Is it possible to get a bundle from a path?
>
> Like if I have a file named testbundle.jar. Is it possible to get a bundle
> object from the path of the file?
>

do you mean something like:


http://www2.osgi.org/javadoc/r4/org/osgi/framework/BundleContext.html#installBundle(java.lang.String)

which lets you install a bundle from a location (typically a URL)
and returns a bundle object for the installed bundle - note if a
bundle has already been installed from that location then you
will get back the previous bundle object.

this method is part of the BundleContext, which is available to
any bundle with a bundle activator (it's passed in via the start
and stop methods)

if you embed Felix then the launcher will give you access to the
system bundle context (see the online docs about embedding)

hope this answers your question - if not please provide more details :)

-- 
Cheers, Stuart

Reply via email to