Courseiva
Java Platform Overview and PackagingmediumMultiple ChoiceObjective-mapped

1Z0-829 Java Platform Overview and Packaging Practice Question

Exhibit

Refer to the exhibit.

```
Error: Unable to initialize main class com.example.Main
Caused by: java.lang.module.ResolutionException: Module com.example.app not found
```

A developer receives the above error when running a modular Java application. What is the most likely cause?

⚠ Common exam trap

A common mix-up: candidates confuse module path errors with classpath errors, assuming a missing class is the issue, when in fact the module system requires the entire module to be 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.app' is not on the module path.

When a modular Java application throws an error indicating that a module cannot be found, the most common cause is that the module's JAR or directory is not present on the module path. The module path is specified using the `--module-path` option (or `-p`) when launching the application with `java --module`. If `com.example.app` is not on that path, the module system cannot resolve it, leading to a `ModuleNotFoundException` or similar 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 module-info.java has a syntax error.

    Why it's wrong here

    A syntax error would be caught at compile time.

  • The module 'com.example.app' is not on the module path.

    Why this is correct

    The error indicates the module was not found.

  • The JRE version is too old.

    Why it's wrong here

    If the JRE were too old, it would not support modules at all.

  • The main class is misspelled.

    Why it's wrong here

    That would cause a different error (ClassNotFoundException).

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

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 →

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.