问题
Directories Structure :
After compilation if i store two module in two different directories[out, out2].
When I'm try to combine two module out and out2 with : operator in java command.
java --upgrade-module-path out:out2 -m myModuleA/myPackA.ClassA
when i try this command throw the error.
Error occurred during initialization of boot layer
java.nio.file.InvalidPathException: Illegal char <:> at index 3: out:out2
Please Suggest me Where is my Mistake.I'm newbie in (Java Modules).
回答1:
As per the documentation
--upgrade-module-path modulepath... Searches for directories from a semicolon-separated (;) list of directories. Each directory is a directory of modules that replace upgradeable modules in the runtime image.
out:out2
should be out;out2
来源:https://stackoverflow.com/questions/55295122/run-two-modules-in-different-directories-in-java-11