Java Platform Module System

Stephan Herrmann stephan.herrmann at
Tue Apr 25 00:22:50 UTC 2017

On 24.04.2017 18:18, mark.reinhold at wrote:
> 2017/4/24 9:14:31 -0700, jay.a at
>> The JLS makes references to the "Java Platform Module System" in
>> several places but we are not sure where this is specified. The
>> Eclipse JDT team has been making do with whatever informal documents
>> we can get our hands on such as "State of the Module System", Javac
>> etc. It would be really nice to get some update on this as this would
>> give us the much needed confidence that we (JDT) are indeed going in
>> the right direction.
> JSR 376 home page:
> Current draft specification, linked from that page:
> - Mark

Thanks. Unfortunately, these links, which we've been using all along, don't
provide the answers we were hoping for.

As of today your references seem to point to the same version as submitted for
Public Review:
   "Java Platform Module System Public Review (updated 14 April 2017)"

The main index.html surely states
   "This specification defines the Java Platform Module System"

Obviously, defining JPMS is not done in index.html itself but delegated
to individual documents.

One of the linked documents is a version of JLS with changes on behalf of JSR 376.

Jay's question was triggered by the observation that this exact version of JLS
contains references like these:
  - "the host system must use the Java Platform Module System to determine ..."
  - "A 'dependency' is the module resolved by the Java Platform Module System
    for a given requires directive."
  - "The Java programming language does not distinguish between named modules
    specified explicitly in module declarations versus named modules specified by the
    Java Platform Module System when it detects a JAR file on the modulepath
    ('automatic modules')"

This creates the impression that for implementing a compiler for JPMS another
document must be consulted in addition to JLS, but the reference "specified by the JPMS"
gives no clue were to look, as it appears inside the specification of JPMS.

We could happily brush these question aside - as a curiosity in JLS wording -
iff JLS would unambiguously tell us how to implement the compiler in a way
that guarantees equivalence to javac. Unfortunately, we don't see how the
current draft of JLS could fulfill this task. That's why we were hoping for
some additional document that might have escaped our attention.


More information about the jigsaw-dev mailing list