© Kishori Sharan 2017

Kishori Sharan, Java 9 Revealed, 10.1007/978-1-4842-2592-9_6

6. Packaging Modules

Kishori Sharan

(1)Montgomery, Alabama, USA

In this chapter, you will learn:

  • Different formats for packaging Java modules

  • Enhancements to the JAR format

  • What a multi-release JAR is

  • How to create and use multi-release JARs

  • What the JMOD format is

  • How to use the jmod tool to work with JMOD files

  • How to create, extract, and describe JMOD files

  • How to list contents of JMOD files

  • How to record hashes of modules in JMOD files for dependency validation

A module can be packaged in different formats to be used in three phases—compile-time, link time, and runtime. Not all formats are supported in all phases. JDK 9 supports the following formats to package modules: ...

Get Java 9 Revealed: For Early Adoption and Migration now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.