You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Mathieu Plourde <ma...@gmail.com> on 2008/06/12 22:27:00 UTC

Is it possible to get a bundle from a path?

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?

Thanks.

Re: Is it possible to get a bundle from a path?

Posted by Stuart McCulloch <st...@jayway.net>.
2008/6/13 Mathieu Plourde <ma...@gmail.com>:

> 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

Re: Is it possible to get a bundle from a path?

Posted by "Richard S. Hall" <he...@ungoverned.org>.
I don't understand the question, but I think the answer is no. :-)

-> richard

Mathieu Plourde wrote:
> 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?
>
> Thanks.
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org