enthuware.ocpjp.ii.v11.2.3440

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
roopamohan12
Posts: 2
Joined: Sun Jun 28, 2020 1:43 am
Contact:

enthuware.ocpjp.ii.v11.2.3440

Post by roopamohan12 »

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

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: enthuware.ocpjp.ii.v11.2.3440

Post by admin »

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
If you like our products and services, please help us by posting your review here.

roopamohan12
Posts: 2
Joined: Sun Jun 28, 2020 1:43 am
Contact:

Re: enthuware.ocpjp.ii.v11.2.3440

Post by roopamohan12 »

Thank you for the explanation!:)

Post Reply

Who is online

Users browsing this forum: No registered users and 61 guests