Question 141 of 509
Java Platform Overview and PackagingmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to place all the jars on the module path and remove them from the classpath when running jdeps. This is correct because when jars remain on the classpath, jdeps treats them as unnamed modules, which prevents it from resolving inter-jar dependencies as module-level relationships, resulting in the misleading 'not found' labels. By moving the jars to the module path, jdeps can analyze each jar as a named or automatic module, enabling accurate dependency resolution for your jdeps module path analysis. On the Oracle Certified Professional Java SE 17 Developer 1Z0-829 exam, this scenario tests your understanding of how the module path versus classpath affects tool behavior—a common trap is assuming jdeps can resolve dependencies from the classpath as it does from the module path. Remember the memory tip: "Classpath is a flat sea; the module path is a structured map"—for jdeps to see the map, jars must sail on the module path.

1Z0-829 Java Platform Overview and Packaging Practice Question

This 1Z0-829 practice question tests your understanding of java platform overview and packaging. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

You are a Java developer at a logistics company. Your team is maintaining a legacy Java 8 application that uses dozens of jars on the classpath. The company has decided to migrate to Java 17 and adopt the module system. As a first step, you are analyzing the application's dependencies using jdeps. You run 'jdeps -s -dotoutput /tmp/deps' on all jars. The output shows many dependencies labeled 'not found' for internal packages that belong to other jars in the application. The packages are correctly exported by the respective jars (which are on the classpath). You suspect that because the jars are on the classpath, jdeps cannot resolve inter-jar dependencies as modules. To get accurate dependency information, what should you do?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "first"

    Why it matters: Order matters here. You are being tested on which action comes before the others — not which action is generally useful.

Question 1mediummultiple choice
Read the full NAT/PAT explanation →

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

Place all the jars on the module path and remove them from the classpath when running jdeps.

When jars are on the classpath, jdeps treats them as unnamed modules and cannot resolve inter-jar dependencies as module-level relationships, leading to 'not found' labels. Placing all jars on the module path (Option B) forces jdeps to treat each jar as a module (if it has a module-info.class) or as an automatic module (if it does not), enabling accurate dependency resolution. This is the correct approach because the module path is designed for module-aware analysis, while the classpath is a legacy flat namespace.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 jlink to create a custom runtime image that includes all the jars.

    Why it's wrong here

    jlink does not analyze dependencies; it creates an image. Also, you should first understand dependencies.

  • Place all the jars on the module path and remove them from the classpath when running jdeps.

    Why this is correct

    This makes them automatic modules, allowing jdeps to resolve inter-jar dependencies as module dependencies.

    Clue confirmation

    The clue word "first" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Run jdeps with the --module-path option pointing to the directory containing all jars, and keep the jars on the classpath.

    Why it's wrong here

    Jars on classpath still are not treated as modules even if given on module path; you must put them on module path.

  • Convert each jar into a named module by adding module-info.java to each jar and recompiling.

    Why it's wrong here

    This is too invasive and time-consuming; using automatic modules is a simpler first step.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates think the --module-path option can be used while keeping jars on the classpath, but jdeps only performs module-aware analysis when all relevant jars are on the module path and none are on the classpath.

Detailed technical explanation

How to think about this question

Under the hood, jdeps uses the module graph to resolve transitive dependencies; on the classpath, all jars are lumped into the unnamed module, which cannot export packages, so jdeps reports 'not found' for any package not in the JDK. By moving jars to the module path, jdeps reads each jar's module descriptor (or synthesizes one for automatic modules), enabling proper resolution of package exports and requires clauses. In real-world migrations, this step is critical to identify missing module dependencies before adding module-info.java files.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related 1Z0-829 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free 1Z0-829 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this 1Z0-829 question test?

Java Platform Overview and Packaging — This question tests Java Platform Overview and Packaging — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Place all the jars on the module path and remove them from the classpath when running jdeps. — When jars are on the classpath, jdeps treats them as unnamed modules and cannot resolve inter-jar dependencies as module-level relationships, leading to 'not found' labels. Placing all jars on the module path (Option B) forces jdeps to treat each jar as a module (if it has a module-info.class) or as an automatic module (if it does not), enabling accurate dependency resolution. This is the correct approach because the module path is designed for module-aware analysis, while the classpath is a legacy flat namespace.

What should I do if I get this 1Z0-829 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "first". Order matters here. You are being tested on which action comes before the others — not which action is generally useful.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on 1Z0-829

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A team is migrating a large monolithic Java 8 application to Java 17 using modules. They want to ensure that only the required packages are exported. Which tool should they use to analyze current dependencies and generate module descriptors?

medium
  • A.jlink
  • B.javap
  • C.jar
  • D.jdeps

Why D: jdeps is the correct tool because it is specifically designed to analyze class dependencies in Java applications and can generate module descriptor (module-info.java) suggestions. It shows which packages are used and which are not, enabling the team to export only the required packages when migrating to Java modules.

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.