默认的配置编译openTCS-Kernel时会报错:
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "org.opentcs.util.configuration.class" "write")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.System.setProperty(System.java:792)
at org.opentcs.kernel.RunKernel.main(RunKernel.java:60)
原因是没有正确引用到java.policy,需要配置VM options:
【openTCS-Kernel】
-enableassertions
-Djava.security.policy=E:\OpenTCS\openTCS-4.18.0-src\openTCS-Kernel\build\install\openTCS-Kernel\config\java.policy
-Djava.util.logging.config.file=E:\OpenTCS\openTCS-4.18.0-src\openTCS-Kernel\build\install\openTCS-Kernel\config\logging.config
-Dopentcs.base="E:\OpenTCS\openTCS-4.18.0-src\openTCS-Kernel\build\install\openTCS-Kernel"
-Dopentcs.home="E:\OpenTCS\openTCS-4.18.0-src\openTCS-Kernel\build\install\openTCS-Kernel"
【openTCS-KernelControlCenter】
-enableassertions
-Djava.security.policy=E:\OpenTCS\openTCS-4.18.0-src\openTCS-KernelControlCenter\build\install\openTCS-KernelControlCenter\config\java.policy
-Djava.util.logging.config.file=E:\OpenTCS\openTCS-4.18.0-src\openTCS-KernelControlCenter\build\install\openTCS-KernelControlCenter\config\logging.config
-Dopentcs.base="E:\OpenTCS\openTCS-4.18.0-src\openTCS-KernelControlCenter\build\install\openTCS-KernelControlCenter"
-Dopentcs.home="E:\OpenTCS\openTCS-4.18.0-src\openTCS-KernelControlCenter\build\install\openTCS-KernelControlCenter"
【openTCS-PlantOverview】
-enableassertions
-Djava.security.policy=E:\OpenTCS\openTCS-4.18.0-src\openTCS-PlantOverview\build\install\openTCS-PlantOverview\config\java.policy
-Djava.util.logging.config.file=E:\OpenTCS\openTCS-4.18.0-src\openTCS-PlantOverview\build\install\openTCS-PlantOverview\config\logging.config
-Dopentcs.base="E:\OpenTCS\openTCS-4.18.0-src\openTCS-PlantOverview\build\install\openTCS-PlantOverview"
-Dopentcs.home="E:\OpenTCS\openTCS-4.18.0-src\openTCS-PlantOverview\build\install\openTCS-PlantOverview"
【上面的路径根据自己的实际路径修改】
就可以正常编译了。