Escaping The Jar Hell With Jigsaw Layers (11:05 - 11:55 on Wednesday)

Nikita LipskyThe JVM + AOT Geek

Jigsaw modules are often criticized for the lack of versioning that exists in alternative module systems for Java, such as OSGi. One of the main purposes of versioning is to solve the so called Jar Hell problem that arises when your application depends on two different versions of the same library. While Jigsaw is able to detect this conflicting situation, it won’t allow you to load both versions that are placed on the module path. However, it is not always possible to eliminate all version conflicts from your application, because other versions of the same libraries can come to your application indirectly via dependencies that you do not control. Fortunately, there is a native solution for the problem in Jigsaw called Layers. In this session, I will show what problems Jigsaw could have introduced if it had explicit versions for modules, and how Jigsaw Layers in conjunction with Jigsaw Services help to solve the Jar Hell problem safely.


Nikita is an initiator and a product lead of Excelsior JET project – full Java SE implementation (JVM) 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 an author of OSGi support at the JVM level in Excelsior JET, Java Runtime Slim-down technology - Java SE modularisation implemented in Excelsior JET since 2007, both Java bytecode verifiers, Spring Boot support and many others.