JMOD file

A packaging format for JDK modules, used by jlink to build runtime images.

In more detail

A JDK's jmods directory holds one .jmod file per platform module, such as java.base.jmod. jlink in Java 21 links from these files and from modular jars on the module path. A JDK built without jmods cannot create runtime images with jlink.

Example

jlink --module-path mods --add-modules com.acme.app --output runtime

Related terms

Taught in

References

Certification courses