1Z0-829 Java Platform Overview and Packaging Practice Question
A developer is migrating a classpath-based application to modules. They have two JARs on the classpath that both contain a package with the same name, com.example.util. When they move both JARs to the module path, they encounter a module resolution error. What is the most likely cause?
⚠ Common exam trap
Candidates often confuse the leniency of automatic modules regarding module readability with the rules for split packages. In fact, split packages are illegal for any named module, including automatic modules. The module system strictly enforces that each package is defined in at most one module on the module path.
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
✓
Named modules cannot have split packages
In the Java module system, a package can be defined in at most one module on the module path. When both JARs contain com.example.util, moving them to the module path creates a split package, which is illegal for named modules. The module system enforces this to ensure reliable configuration and encapsulation, resulting in a module resolution error.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The --add-exports option is missing
Why it's wrong here
--add-exports grants access to non-exported packages, but the error is about split packages.
- ✓
Named modules cannot have split packages
Why this is correct
Both JARs become automatic modules (named), and split packages are disallowed among named modules.
- ✗
The JARs need to be merged into one module
Why it's wrong here
Merging is a workaround but not the cause of the error.
- ✗
Automatic modules cannot have split packages
Why it's wrong here
While true, the issue applies to all named modules, not just automatic.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 1Z0-829 question from scratch — 513 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.