About Question enthuware.ocpjp.ii.v11.2.3439 :

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

Moderator: admin

Post Reply
silvia.cazan
Posts: 1
Joined: Thu Jun 04, 2020 6:31 am
Contact:

About Question enthuware.ocpjp.ii.v11.2.3439 :

Post by silvia.cazan »

Regarding automatic modules, they are said to be able to read every other module on the module path and/or class path without an explicit requires clause, because there is no module-info.java file.
Taken this into consideration, I think the last answer for this question is also correct and the explanation is incorrect:

"java  --module-path accounting-3.3.jar;reporting-5.6.jar --module reporting/com.abc.reporting.Main
By putting reporting jar on module path, it has been converted into an automatic module (which is a named module with name reporting without any requires clause.). However, a named module cannot access a class from another named module without appropriate requries clause. Therefore, this command will not work."

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

Re: About Question enthuware.ocpjp.ii.v11.2.3439 :

Post by admin »

You are right. The answer and the explanation have now been fixed.
thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.

joseph_xltq
Posts: 1
Joined: Mon Dec 19, 2016 12:38 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3439 :

Post by joseph_xltq »

Also, I think -add-modules would fix the second option, not -add-exports.
java -classpath reporting-5.6.jar --module-path accounting-3.3.jar; com.abc.reporting.Main

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

Re: About Question enthuware.ocpjp.ii.v11.2.3439 :

Post by admin »

You are right. Fixed.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests