At the beginning of 2019, I wrote about the state of Java modularization. I took a sample of widespread libraries and for each of them, I checked whether:
- It supports the module system i.e. it provides an automatic module name in the manifest
- It's a full-fledged module i.e. it provides a
The results were interesting. 14 out of those 29 libraries supported the module system, while 2 were modules in their own right.
Nearly 2 years later, and with Java 16 looming around the corner, it's time to update the report. I kept the same libraries, and added Hazelcast and Hazelcast Jet. I've checked the latest version.
|Jan. 2019||Oct. 2020|
|Name||Analyzed version||Module name||Modularized?||Analyzed version||Module name||Modularized?|
|Commons Math||3.6.1||❌||❌||No new release|
|Xerces 2||2.12.0||❌||❌||No new release|
||✓||No new release|
|Trove||3.1.0||❌||❌||No new release|
|Commons Email||1.5||❌||❌||No new release|
|Hazelcast Jet||First check||4.2||
Oracle released Java 9 in September 2017. Three full years after that release, 10 out of 31 libraries still don't provide a module-compatible JAR. Granted, 3 of them didn't release a new version in the meantime. That's still 7 libraries that didn't add a simple line of text in their
On the good side, Jackson, GSon, and Junit migrated to the module system. This is not a trivial effort and deserves some praise.
On the other side, SLF4J migrated back from the module system to an automatic module name. That's an issue. If developers decide to use the module system and declare the dependencies of their app, they cannot upgrade libraries that follow this practice. I don't know what to make out of it.
I checked the new v2 version (still in alpha), and it even has no
Before writing this post, I assumed the penetration of JPMS in the ecosystem was close to none. I'm pleasantly surprised. However, while there's progress, it's slow. And modularizing your application if you have non-modularized dependencies is not trivial.
To go further:
- A hard look at the state of Java modularization
- Explicitly Naming Automatic Java Modules
- Migrating the ServiceLoader to the Java 9 module system
- Migrating a Spring Boot application to Java 9 - part 1
- Migrating a Spring Boot application to Java 9 - part 2
- Containerizing Apps with jlink
- ModiTect - Tooling for the Java Module System
Originally published at A Java Geek on October 25th, 2020