nerdexam
Oracle

1Z0-819 · Question #113

jdeps -jdkinternals C:\workspace4\SimpleSecurity\jar\classes.jar Which describes the expected output?

The correct answer is A. jdeps lists the module dependencies and the package names of all referenced JDK internal APIs. If any are found, the suggested replacements are output in the console. Option A is correct because jdeps -jdkinternals produces two distinct categories of output: it first lists the module-level dependencies (which modules the jar relies on), then identifies the package names of any JDK internal APIs referenced - and when internals are found…

Java Platform Module System

Question

jdeps -jdkinternals C:\workspace4\SimpleSecurity\jar\classes.jar Which describes the expected output?

Options

  • Ajdeps lists the module dependencies and the package names of all referenced JDK internal APIs. If any are found, the suggested replacements are output in the console.
  • Bjdeps outputs an error message that the -jdkinternals option requires either the --summary or the --verbose options to output to the console.
  • CThe -jdkinternals option analyzes all classes in the .jar and prints all class-level dependencies.
  • DThe -jdkinternals option analyzes all classes in the .jar for class-level dependencies on JDK internal APIs. If any are found, the results with suggested replacements are output in the console.

How the community answered

(53 responses)
  • A
    81% (43)
  • B
    2% (1)
  • C
    6% (3)
  • D
    11% (6)

Explanation

Option A is correct because jdeps -jdkinternals produces two distinct categories of output: it first lists the module-level dependencies (which modules the jar relies on), then identifies the package names of any JDK internal APIs referenced - and when internals are found, jdeps appends a table of suggested public replacements in the console.

Why the distractors fail:

  • B is fabricated - -jdkinternals requires no companion flags; it works standalone and produces output by default.
  • C is wrong in scope - -jdkinternals is specifically scoped to JDK internal API dependencies, not all class-level dependencies (that's closer to what -verbose:class does).
  • D is subtly wrong because it omits the module-level dependency listing and describes only "class-level dependencies," missing that the output also surfaces module membership information alongside the internal API references.

Memory tip: Think of -jdkinternals as a migration helper - its whole job is to find the bad stuff (JDK internal API usage) and tell you what to use instead; if it only listed dependencies without suggestions, it would be half-baked and unhelpful for migration tasks.

Topics

#jdeps#module dependencies#JDK internals#dependency analysis

Community Discussion

No community discussion yet for this question.

Full 1Z0-819 Practice