jlink: How to Create a Minimal Custom Java Runtime Image
A developer has created a modular Java application. They want to distribute a minimal runtime image containing only the required modules. Which tool should they use?
Quick Answer
The answer is `jlink`, the Java tool designed to create a custom runtime image. It is correct because `jlink` links only the specified application modules and their transitive dependencies into a minimal JRE, stripping out unused modules to reduce the distribution footprint. On the Oracle Certified Professional Java SE 17 Developer 1Z0-829 exam, this question tests your understanding of the Java module system and the `jlink` tool for optimizing deployment—a common trap is confusing `jlink` with `jpackage` (which packages the image into an installer) or `jmod` (which creates modular JARs). Remember that `jlink` is the linker: it takes your modular application and produces a lean, self-contained runtime. A helpful memory tip is to think of "link" as in "linking only what you need"—if your app uses five modules, `jlink` gives you a JRE with just those five, not the entire JDK.
⚠ Common exam trap
Watch out — candidates often confuse `jpackage` (which creates installers) with `jlink` (which creates the runtime image), or assume `jar` can produce a runnable image because it can create executable JARs with a manifest.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
jlink
B is correct because `jlink` is the Java tool specifically designed to assemble and optimize a minimal runtime image containing only the modules explicitly required by the application and its transitive dependencies. It links the specified modules and their dependencies into a custom JRE that excludes unused modules, reducing footprint for distribution.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
javac
Why it's wrong here
javac is the Java compiler, not used for creating runtime images.
- ✓
jlink
Why this is correct
jlink creates a custom runtime image with only required modules.
- ✗
jar
Why it's wrong here
jar is used to create JAR files, not runtime images.
- ✗
jpackage
Why it's wrong here
jpackage creates native installers, not minimal runtime images.
Go deeper
Related to this question
About these practice questions
This 1Z0-829 question is part of Courseiva's 513-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on 1Z0-829
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A development team wants to ensure that a Java 17 application runs with a specific set of modules. They want to minimize the footprint by including only necessary modules. Which tool should they use?
medium- A.javac
- ✓ B.jlink
- C.jmod
- D.jar
Why B: B is correct because jlink is the Java tool specifically designed to assemble and optimize a custom runtime image containing only the modules explicitly required by an application. It analyzes module dependencies and produces a minimal JRE, reducing footprint by excluding unused modules, which aligns with the team's goal of minimizing size.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.