What exactly is Apache Karaf?

TLDR: Apache Karaf is much more ‘batteries-included’. It can also run on any OSGI runtime. Apache Felix (which is an implementation of the OSGi 4.2 framework) Sort of. Apache Karaf can use Apache Felix. Apache Karaf can also use Equinox or another OSGi runtime. By default, the Apache Karaf standard download does come with Apache … Read more

OSGi: What are the differences between Apache Felix and Apache Karaf?

The ‘lightweight OSGi container’ label is contrasting Karaf with more feature rich OSGi containers, not with Felix. To quote Guillaume Nodet (Karaf’s author) from here: Felix is just the OSGi core runtime. Karaf provides a “distribution” based on Felix by adding other features such as a console, an SSH remoting mechanism, a file deployer and … Read more

Reading my own Jar’s Manifest

You can do one of two things: Call getResources() and iterate through the returned collection of URLs, reading them as manifests until you find yours: Enumeration<URL> resources = getClass().getClassLoader() .getResources(“META-INF/MANIFEST.MF”); while (resources.hasMoreElements()) { try { Manifest manifest = new Manifest(resources.nextElement().openStream()); // check that this is your manifest and do what you need or get the … Read more

What does OSGi solve?

what benefits does OSGi’s component system provide you? Well, Here is quite a list: Reduced Complexity – Developing with OSGi technology means developing bundles: the OSGi components. Bundles are modules. They hide their internals from other bundles and communicate through well defined services. Hiding internals means more freedom to change later. This not only reduces … Read more