JEP 493: Linking Run-Time Images without JMODs
📌 What Is This JEP About?
JEP 493 simplifies the use of the jlink
tool by allowing developers to create custom Java runtime images without needing .jmod
files.
đź’ˇ Motivation
Before JEP 493, if you wanted to build a custom runtime image using jlink
, you had to:
Compile your code as a modular JAR
Then generate a JMOD file using the
jmod
toolOnly then could you run
jlink
to create a runtime image
This made the process more complicated and redundant—especially in build pipelines or for library authors.
📦 What is a .jmod
File?
.jmod
File?A JMOD file is a format introduced with the Java Platform Module System in Java 9. It's:
A package format for compiled module artifacts
Contains
.class
files, native libs, configs, etc.Used internally by the JDK for standard modules
Think of it like a fatter version of a JAR—but mostly useful for JDK developers, not application developers.
🛠️ Problem With JMODs
For most real-world modular applications:
You already build modular JARs
You rarely need native code or special packaging
Creating
.jmod
files adds unnecessary stepsBuild systems like Maven and Gradle don't produce JMODs by default
This creates friction.
âś… What JEP 493 Changes
JEP 493 allows jlink
to:
Accept modular JAR files directly
Skip the need for
.jmod
files altogetherTreat modular JARs and JMODs interchangeably as input to the module path
So now:
Modular JAR →
jlink
→ Custom Runtime No intermediate.jmod
step needed.
🚀 Benefits of JEP 493
đź§ą Simpler Workflows
No need to generate .jmod
files manually
⚙️ Tooling Compatibility
Works smoothly with Maven/Gradle outputs (modular JARs)
📦 CI/CD Friendly
Easier automation in pipelines
đź§© Modular Adoption Boost
Lowers the barrier to adopting Java modules
đź§Ş No Loss of Functionality
Native libraries and launchers still supported in other ways
📜 Summary
.jmod
files are no longer required to link custom runtimesjlink
now accepts modular JARs directlyThis improves developer experience, simplifies builds, and removes redundancy
JEP 493 is a quality-of-life improvement for modular Java projects
Last updated