Run Two Modules in Different Directories in Java 11

落花浮王杯 提交于 2021-02-08 06:52:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!