Why not use the Manifest?

Peter Kriens peter.kriens at aqute.biz
Mon Sep 28 16:49:53 UTC 2015

The encoding of the module data in a binary class file remains hard to understand and seems to go against the best practices we learned the hard way over the past decades. (Debugging!)

Especially since the current proposal leaves the heavy lifting to build tooling. In the proposal, build tools cannot use the module-info.java since it does not contain sufficient information. (Versions being the most glaring omission for a build too.) Nor is the format extensible to contain build tool specific information. Ergo, the build tool will have to generate the module-info.class file.

This make the class file makes these tools unnecessary hard and slower because it must either use the compiler as an intermediate step or use a library like ASM to create the unreadable version of its metadata. 

This is the first time in a very long time that I see a regression to binary files for meta data. Especially because there is already a good place that all build tools are already using: the manifest.

More information about the jpms-spec-observers mailing list