Conan,
The "location" parameter on installBundle() has nothing to do with
the installation directory of your OSGi runtime. It is the logical
location from which your bundle is sourced, usually as a URL. In the
case where you supply an InputStream, the location can even be an
abstract one such as "ich://bin/ein/berliner". Basically it is the
identity of the bundle.
When you don't supply an InputStream, the location URL must resolve
to a physical location, eg "file:///c:/Mybundle.jar" or "http://
www.example.org/MyBundle.jar".
Regards
Neil
On 24 Feb 2007, at 13:49, ich bin wrote:
Hi,
Not sure what you mean by "the OSGi directory"??
OSGi doesn't really require a file system, and AFAIK no such term
exist at
the
specification level. However, BundleContext.getDataFile() returns
you a
file
handle to a file which is in scoped by the bundle. Where this is,
is up to
the framework implementation, and you can't make any further
assumptions
on
where other stuff is.
I would like to install and start an OSGi bundle from an
InputStream. And I wrote lines of code like that:
...................
Bundle bundle = context.installBundle(String location, inputStream);
inputStream.close();
bundle.start();
However, I do not know which value I should pass for the first
parameter, location , of the funtion installBundle() . Be aware
that I assume that I do not know in advance where root directory of
OSGi is allocated in the file system. How can it be done?
Could anyone give me a tip?
Regards,
Conan.
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev