Java SE 11 Developer — Question 6
Given:
jdeps -jdkinternals C:\workspace4\SimpleSecurity\jar\classes.jar
Which describes the expected output?
Answer options
- 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.
- B. jdeps outputs an error message that the -jdkinternals option requires either the -summary or the -verbose options to output to the console.
- C. The -jdkinternals option analyzes all classes in the .jar and prints all class-level dependencies.
- D. The -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.
Correct answer: A
Explanation
The correct answer, A, accurately describes the output of the jdeps command, which includes module dependencies and package names for referenced JDK internal APIs, along with suggested replacements. Option B is incorrect because the -jdkinternals option does not require -summary or -verbose to provide output. Option C misrepresents the focus of the analysis, as it does not specifically mention JDK internal APIs. Option D is partially correct but does not emphasize the output of suggested replacements, which is a key aspect of option A.