IT lexicon › Programming › OSGi

OSGi

Programming På svenska → Updated: 2026-08-01
More info
Type
Module system for Java
Released
1999
Owner
Eclipse Foundation (previously the OSGi Alliance)
Successor
JPMS (Java 9)

Dynamic modules for Java, with versioned dependencies and the ability to swap code out while the process keeps running.

It started in 1999 as the "Open Services Gateway initiative", aimed at home automation and set-top boxes — an expansion the organisation later quietly stopped using. The unit is the bundle: a JAR with a manifest that states exactly which packages it exports and which version ranges it imports. The runtime gives each bundle its own classloader, which solves the problem of two versions of the same library in one process.

The price is complexity. Eclipse has been built on the OSGi implementation Equinox since version 3.0 in 2004, and Apache Karaf and Liferay still depend on it. For new systems the idea has effectively lost: Java 9 brought JPMS in 2017, and most teams concluded that one container per service isolates things more simply than a module system inside the JVM.

← Back to the lexicon