Page 1 of 1

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

Posted: Sat Jan 09, 2021 10:11 am
by teodorj
Remember that one modular jar contains only one module. So, moduleA.jar will contain only one module.
If moduleA depends only only standard JDK modules, then jdeps will print them.
However, if this module depends on any other application module (for example, moduleB), jdeps won't find it and will therefore fail.
duplicate word in bolded text above

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

Posted: Sun Jan 10, 2021 12:53 am
by admin
Fixed.
thank you for your feedback!

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

Posted: Mon Oct 10, 2022 3:20 pm
by sohamdatey22
is the options second not valid as we have used --list-deps?
and if we had not used would the flag, will the option 2 be correct?

also why option 3 is incorrect?
It will list all the standard JDK modules on which moduleA depends.
I ran the command on my modular jar and got the standard module java.base

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

Posted: Tue Oct 11, 2022 4:06 am
by admin
Option 2 is not valid because it will not list all the packages.

Option 3 is incorrect because it will list all the modules and not just standard jdk modules. Since all modules includes jdk modules, option 1 is preferred.

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

Posted: Tue Oct 11, 2022 7:49 am
by sohamdatey22
and if we had not used the flag --list-deps, will the option 2 be correct?

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

Posted: Tue Oct 11, 2022 8:01 am
by admin
Yes, you can try out something like jdeps TestClass.class and see the output.