Courseiva
Java Platform Overview and PackagingmediumMultiple ChoiceObjective-mapped

1Z0-829 Java Platform Overview and Packaging Practice Question

A developer creates a module `com.example.app` that requires `java.sql` and `com.example.util`. The module is compiled and packaged into a JAR. When launching the application with `java --module-path app.jar:lib --module com.example.app`, it fails with `java.lang.module.ResolutionException: Module com.example.util not found`. What is the most likely cause?

⚠ Common exam trap

Oracle often tests the distinction between module resolution failures (missing module) and access control failures (module found but not exported), so candidates may incorrectly choose an option about exports or classpath visibility when the actual issue is that the module JAR is simply not present 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

The module `com.example.util` is not in the module path.

The error `Module com.example.util not found` indicates that the module system cannot locate `com.example.util` on the module path. Since the command specifies `--module-path app.jar:lib`, the JAR for `com.example.util` must be present in the `lib` directory (or another directory on that path). If it is missing or not in the correct location, the module resolution fails. Option B correctly identifies that the module is simply not on the module path.

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 module `com.example.util` is an automatic module and requires specific flags.

    Why it's wrong here

    Automatic modules are resolved without extra flags if on module path.

  • The module `com.example.util` is not in the module path.

    Why this is correct

    The module path must include all required modules explicitly.

  • The module `com.example.util` is a named module but not exported.

    Why it's wrong here

    ResolutionException is about not found, not about exports.

  • The module `com.example.util` is on the classpath and not visible to module system.

    Why it's wrong here

    If on classpath, it would be treated as unnamed module but not resolved by name.

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 →

How Courseiva writes practice questions · Editorial policy

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.