Courseiva
Exception Handling and Development ToolsmediumMultiple ChoiceObjective-mapped

1Z0-811 Exception Handling and Development Tools Practice Question

Network Topology
$ javac -d outmodule-source-path src -m com.example.appRefer to the exhibit.src/com.example.app/com/example/app/Main.java:5: error: cannot find symbolimport com.example.util.Helpersymbol: class Helperlocation: package com.example.util1 error

A developer tries to compile a modular Java application using the command shown in the exhibit. The compilation fails with the error shown. What is the most likely cause?

⚠ Common exam trap

Oracle often tests the distinction between module path and module source path, trapping candidates who confuse `-d` (output directory) with source path or who think import syntax is the issue when the real problem is a missing module source location.

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-source-path` does not include the location of the utility module.

The error indicates that the compiler cannot find the utility module referenced in the `requires` directive. The `--module-source-path` option must list all directories containing module source code. Since the utility module's source is not included in the specified path, the compilation fails. Option D correctly identifies this missing path as the cause.

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 `-d out` flag is incorrectly specified; it should point to the source directory.

    Why it's wrong here

    `-d` sets the destination for class files; it does not affect module resolution.

  • The `-m` option should be `--module` instead.

    Why it's wrong here

    `-m` is a valid shorthand for `--module` in javac.

  • The import statement should use the fully qualified class name instead of importing.

    Why it's wrong here

    Imports are fine; the core issue is that the class is not found on the module path.

  • The `--module-source-path` does not include the location of the utility module.

    Why this is correct

    The module source path must point to the directory that contains all module source directories; if missing, dependent modules cannot be resolved.

About these practice questions

One of 481 original 1Z0-811 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-811 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-811 exam.