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
jmodtoolOnly then could you run
jlinkto 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
.classfiles, 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
.jmodfiles 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
.jmodfiles altogetherTreat modular JARs and JMODs interchangeably as input to the module path
So now:
Modular JAR →
jlink→ Custom Runtime No intermediate.jmodstep 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
.jmodfiles are no longer required to link custom runtimesjlinknow 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