Page 1 of 1

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

Posted: Tue Jul 09, 2019 8:38 am
by BinSlayer
Hi
Could you explain why this option number 4 is not also correct?
java -p mysql-connector-java-8.0.11.jar;datalayer.jar;myapp.jar -m abc.myapp/com.abc.myapp.Main

You put all 3 jars on the module path, so there's your jar "myapp" and when you place the other 2 on the module-path they should become Automatic Modules, right? Your module-info says it requires "datalayer", this being an automatic module should then depend perfectly fine on all other named modules, automatic modules and jars on the classpath.
As far as I know that's the rule for Automatic Module. They shall require everything (named modules, automatic modules and jars on classpath) and they should export all their packages to the outside.
Am I not right? Maybe I'm missing something here. Any help is appreciated.

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

Posted: Tue Jul 09, 2019 10:13 am
by admin
You are right. This option would work as well. Updated.

thank you for your feedback!
Paul.