问题描述
我有一个JPMS框架,可以动态创建JPMS层并向其中添加模块.经过一些测试,在我看来--add-opens
JVM参数仅适用于boot layer
,我的意思是应用程序启动时创建的层.
I have a JPMS framework that dynamically creates JPMS layers and add modules to them. After some tests it seems to me that --add-opens
JVM parameter works only for the boot layer
, I mean the layer that is created when application starts.
那么,问题---add-opens
是否可用于JPMS中动态创建的图层?
So, the question - does --add-opens
work for dynamically created layers in JPMS?
具体示例
--add-opens java.base/java.lang=weld.servlet.shaded
如果weld.servlet.shaded
位于动态创建的图层中,那么
java.base/java.lang
是否会向weld.servlet.shaded
打开?
will java.base/java.lang
be opened to weld.servlet.shaded
if weld.servlet.shaded
is in dynamically created layer?
推荐答案
答案由@AlanBateman提供
The answer was given by @AlanBateman
这篇关于--add-opens是否可用于JPMS中动态创建的图层?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!