Does --add-opens work for dynamically created layers in JPMS?

本秂侑毒 提交于 2020-04-30 11:05:08

问题


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.

So, the question - does --add-opens work for dynamically created layers in JPMS?

Concrete example

--add-opens 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?


回答1:


The answer was given by @AlanBateman

The --add-opens CLI option is for the boot layer only.



来源:https://stackoverflow.com/questions/60955701/does-add-opens-work-for-dynamically-created-layers-in-jpms

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