You find a lot of tutorials about OSGi on the web. Why add another introduction to OSGi? Well, the usual reason: they didn’t really help me. I want to understand things from the ground up, and I want that ground to be as simple as possible.
Most tutorials that I have found are centered around some tool that is supposed to overcome the difficulties of OSGi. But is OSGi really so difficult to master? No it isn’t. You just mustn’t start with complex tools or patterns. Knowing the JDK and its basic tools is quite sufficient. Of course, you should also have some general knowledge about modular programming and component based software, because OSGi is basically about how to build and use modularized and component based applications with a given framework.
The examples used in this introduction are available from the project site as an Eclipse project. I know that there are other IDEs around, but that’s the one I prefer. For the initial parts of this introduction, the IDE is actually irrelevant. If you want to, you can use a text editor and build the examples with
jar. There are also gradle build configurations provided that automate those compilation and packaging steps1.
If you want to comment on this introduction, please use the links at the bottom of the pages.