enthuware.ocpjp.ii.v11.2.3440
Posted: Sun Jun 28, 2020 1:53 am
Question :
Your application uses one modular jar (a.jar), which, in turn, uses one non-modular jar (b.jar). Which of the following commands will cause jdeps to include the non-modular jar in its analysis?
One of the incorrect answers:
jdeps --module-path lib\a.jar; lib\b.jar
Explanation for incorrect answer:
If you put a.jar on module-path, then jdeps will try to build its module graph. It will look for module b (because it is given in the problem statement that a.jar uses b.jar). But b.jar is not on the module-path, so jdeps will given an error saying a required module b is not found.
Doubt:
If a non-modular jar is placed in the module path wont it become an automatic module? (b.jar placed on the module path will become an automatic module)So while resolving the module system will be able to find it and there will not be an error
Your application uses one modular jar (a.jar), which, in turn, uses one non-modular jar (b.jar). Which of the following commands will cause jdeps to include the non-modular jar in its analysis?
One of the incorrect answers:
jdeps --module-path lib\a.jar; lib\b.jar
Explanation for incorrect answer:
If you put a.jar on module-path, then jdeps will try to build its module graph. It will look for module b (because it is given in the problem statement that a.jar uses b.jar). But b.jar is not on the module-path, so jdeps will given an error saying a required module b is not found.
Doubt:
If a non-modular jar is placed in the module path wont it become an automatic module? (b.jar placed on the module path will become an automatic module)So while resolving the module system will be able to find it and there will not be an error