How to save yourself from Jar Hell with the help of Jigsaw Layers

Day 1 /  / Track 3  /  RU

Java Platform Module System aka JPMS или Jigsaw is often criticized for the absence of versioning, which is included in alternative Java module systems, such as OSGi. One of the main goals of versioning is to solve the Jar Hell problem, which appears when the application depends on two different versions of the same library.

Jigsaw can detect this kind of conflict by detecting so-called split packages, but it won't allow to load two versions of the same module when they are present in the module path. However, it isn't always possible to eliminate version conflict in big applications, because conflicting versions may appear in them through transitive dependences, which the developer can't always control. Thankfully, Jigsaw is able to solve this problem using so-called Jigsaw Layers.

In this talk we'll look which problems would appear if Jigsaw had had explicit module versions, and how Jigsaw Layers together with Jigsaw services allow us to solve the Jar Hell problem safely.


Download presentation
Nikita Lipsky
Excelsior LLC

Nikita is the initiator and product lead of Excelsior JET project — certified Java SE implementation with AOT compiler developed by Excelsior LLC. Working on the project since 1997 he took part in almost every activity of the project from the JVM core to product management and support. In particular, he is the author of OSGi support at the JVM level in Excelsior JET, Java Runtime Slim-Down technology (Java SE modularization implemented in Excelsior JET since 2007), both Java bytecode verifiers and many others.

Speaker's previous talks