在Java 11中的不同目录中运行两个模块 [英] Run Two Modules in Different Directories in Java 11
问题描述
目录结构:
编译后,如果我将两个模块存储在两个不同的目录中[out,out2].
After compilation if i store two module in two different directories[out, out2].
当我尝试将两个模块out和out2与Java命令中的:运算符组合在一起时.
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
请建议我我的错误在哪里.我是(Java模块)的新手.
Please Suggest me Where is my Mistake.I'm newbie in (Java Modules).
推荐答案
按照-upgrade-module-path modulepath ... 从以分号(;)分隔的目录列表中搜索目录.每个目录都是一个模块目录,用于替换运行时映像中的可升级模块.
--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
应该是out;out2
这篇关于在Java 11中的不同目录中运行两个模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!