felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@adobe.com>
Subject Re: ClassLoader creation
Date Fri, 30 Mar 2012 11:02:35 GMT

Am 30.03.2012 um 06:16 schrieb Jochen Wiedmann:

> Hi,
> being a complete novice with OSGI and Felix, I wonder how to properly
> port the following code:
>     final URL[] urls;  //List of jar files, which are downloaded from a server.
>     final ClassLoader parent:
>     final ClassLoader cl = new URLClassLoader(urls, parent);
> The idea being, of course, that I would like to handle the downloaded
> jar files as OSGI bundles that are being started etc.

You mean, you have an application installed in an OSGi framework and you download JAR files
which happen to be bundles and you want to install them in the framework ?

If sou, you would just open an InputStream to those JAR files and had it over to BundleContext.installBundle(String,
inputStream) where string would be an URL (or an URL like identification, for example the
URL from where you got the bundle initially)

Hope this helps.


> -- 
> "Bildung kommt von Bildschirm und nicht von Buch, sonst hieße es ja Buchung."
> Dieter Hildebrandt

Köstlich ;-)

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

View raw message