Module names for Java 9 JPMS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo/gradle
generated
generator
.gitignore
LICENSE
README.md
generate.jsh

README.md

Module names for Java SE 9 JPMS

Java SE 9 brings a new feature, the Java Platform Module System (JPMS). Due to certain constraints in the design, it is important for there to be an agreed naming strategy across open source projects. My proposed strategy is detailed here.

In summary, the strategy is:

  • Module names must be reverse-DNS, just like package names, e.g. org.joda.time.
  • Modules are a group of packages. As such, the module name must be related to the package names.
  • Module names are strongly recommended to be the same as the name of the super-package.
  • Creating a module with a particular name takes ownership of that package name and everything beneath it.
  • As the owner of that namespace, any sub-packages may be grouped into sub-modules as desired so long as no package is in two modules.

Well-known module names

To get the whole process started, I've gathered some module names, based on conversations with the relevant projects.

📀 indicates an explicit module: the jar includes a valid module-info.class.

💿 marks a jar that defines a stable Automatic-Module-Name in it's MANIFEST.MF file.