Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Java Modularity Proposal: iJAM

Java Modularity Proposal: iJAM

This item in japanese

A new proposal, iJAM, has circulated on the
JSR-294 and modules-dev mailing lists suggesting some changes to the logic supplied in the strawman proposal for JSR-294 'superpackages', and has received some positive feedback from Doug Lea:

[The proposal] is VERY nice! It took a couple of reads to see that the non-reverse dfs was not only what you want, but the key to cleanly supporting "import own M" and "import M as X".

iJAM: a more expressive & intuitive semantics describes potential weaknesses of the Java module system:

We discovered that although the module system helps solve many complicated software design issues, it is not expressive enough to solve what we call the high-level separation problem. We also found that the module and class definition lookup functions gave slightly unintuitive behaviour.

The high-level separation problem exists when two modules depend on a third module, but do not want to share said module. The unintuitive lookup functions addresses the reverse depth-first search (parent then self) proposed, which can make it difficult for a lower-level module to control its own scope.

The iJAM proposal attempts to solve these problems with the following solutions: - Depth-first (self then parent) lookup of class and module definitions - Import clauses that allow control over sharing of modules.

Both the early-access release of the Java Module System and iJAM can be downloaded, experimented with, and tested; this is a good opportunity to experiment with the proposals, see them in action and even offer your feedback.

For more information about these and related topics, consider reading JSR-277: Java Module System, JSR-294: Improved Modularity Support in the Java Programming Language, JSR-291: Dynamic Component Support for Java SE as well as InfoQ's coverage of the debate on the overlap and the value of each of these proposals and the early access release of 277 and 294 from the OpenJDK project.

Rate this Article