About Question enthuware.ocpjp.i.v11.2.3027 :
Posted: Sat Jan 09, 2021 3:23 am
In the explanation..
I think the --module-path parameter should contain slash like below:
javac --module-source-path src --module-path thirdpartymodules/utils.jar -d out --module moduleA
4. --module-path or -p: This option specifies the location(s) of any other module upon which the module to be compiled depends and is very versatile. You can specify the exploded module directories, directories containing modular jars, or specific modular jars here.
For example, if you want to compile moduleA and it depends on another module named abc.util packaged as utils.jar located in thirdpartymodules directory then your module-path can be thirdpartymodules or thirdpartymodules/utils.jar. That both the
following two commands will work:
javac --module-source-path src --module-path thirdpartymodules -d out --module moduleA
and
javac --module-source-path src --module-path thirdpartymodulesutils.jar -d out --module moduleA
I think the --module-path parameter should contain slash like below:
javac --module-source-path src --module-path thirdpartymodules/utils.jar -d out --module moduleA