When Jigsaw was released with Java 9, it was the end of a long process - it had been postponed already - and it had to be released. With the coming of Java 11, the latest Long-Term Support, I think it’s a good time to take a snapshot of the state of modularization.
I’ll use the Top 20 Libraries and APIs Java Developer should know as a reference, and check for each of them if the latest version:
- provides an automatic module name
- or has a
In the first case, the JAR has a stable module name. It’s still an automatic module, but it’s the first step into the module system. In the second case, the JAR is a full-fledged module as it has completely embraced the module system.
|Name||Analyzed version||Module name||Modularized?|
Only two of the libraries above are actually modularized! That is understandable, since implementing modules in one’s own library is a non-trivial effort. However, a lot of libraries - about 50% - don’t have an
Automatic-Module-Name, even though:
- It costs virtually nothing
- The latest version has been published in 2018 - Java 9 has been released in September 2017
Because of that, it makes it very hard for client applications/frameworks/libraries e.g. Spring to be modularized themselves. That makes me wonder what the future looks like for modules.
|Interestingly enough, despite the lack of module support, a lot of the above libraries are OSGI bundles (e.g. ProtoBuf)|