1Z0-829 Java Platform Overview and Packaging Practice Question
A financial trading application is developed using Java 17 and the Java Platform Module System (JPMS). The application consists of 50 named modules, including third-party libraries that are automatic modules. The team uses jlink to create a custom runtime image for deployment on customer servers. They observe that the jlink process takes over 10 minutes and produces an image of 200 MB. They want to reduce both the build time and the image size. Which action would be most effective?
⚠ Common exam trap
The trap here is that candidates often focus on image size reduction techniques like compression or stripping debug info, overlooking that the primary bottleneck is jlink's module graph resolution time, which --limit-modules directly addresses by constraining the module universe.
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
✓
Use the --limit-modules option to restrict jlink to only the application's root modules.
The --limit-modules option restricts jlink to only the specified root modules and their transitive dependencies, pruning unnecessary modules from the analysis and image. This directly reduces the number of modules jlink must process, cutting build time, and eliminates unused module classes from the runtime image, shrinking its size. In contrast, options like --strip-java-debug-attributes or --compress=2 only reduce image size after all modules are included, without addressing the root cause of excessive module scanning.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use the --limit-modules option to restrict jlink to only the application's root modules.
Why this is correct
--limit-modules prevents jlink from resolving unnecessary transitive modules, drastically reducing both build time and image size.
- ✗
Replace jlink with jpackage to create a platform-specific installer.
Why it's wrong here
jpackage still uses jlink internally and does not reduce the number of resolved modules.
- ✗
Use the --strip-java-debug-attributes option to remove debug information.
Why it's wrong here
Stripping debug attributes offers minimal size reduction and does not affect resolution time.
- ✗
Add the --compress=2 option to the jlink command.
Why it's wrong here
Compression reduces size but does not speed up module resolution, which is a major factor in build time.
Go deeper
Related to this question
About these practice questions
One of 513 original 1Z0-829 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.