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
enthuware.ocpjp.ii.v11.2.3440
Moderator: admin
-
- Posts: 2
- Joined: Sun Jun 28, 2020 1:43 am
- Contact:
-
- Site Admin
- Posts: 10057
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: enthuware.ocpjp.ii.v11.2.3440
But b.jar is not on the module-path. There is a space between lib\a.jar; and lib\b.jar, so basically, you are setting module-path to a.jar and asking jdeps to analyze b.jar, but b.jar is not on module path.
But yes, the following commands will work:
jdeps --module-path libs\b.jar libs\b.jar
jdeps --module-path libs b.jar
But yes, the following commands will work:
jdeps --module-path libs\b.jar libs\b.jar
jdeps --module-path libs b.jar
If you like our products and services, please help us by posting your review here.
-
- Posts: 2
- Joined: Sun Jun 28, 2020 1:43 am
- Contact:
Re: enthuware.ocpjp.ii.v11.2.3440
Thank you for the explanation!:)
Who is online
Users browsing this forum: No registered users and 64 guests