Code: Select all
java -classpath reporting-5.6.jar --module-path accounting-3.3.jar; com.abc.reporting.Main
"Since the Main class is loaded from reporting jar, which is not a modular jar, the JVM does not know which modules are required by this class. So, even though accounting jar is on the module-path, it will not be loaded and so, classes from accounting jar will not be found."
The following option is correct:
Code: Select all
java --module-path accounting-3.3.jar;reporting-5.6.jar --module reporting/com.abc.reporting.Main