module com.A does not "opens com.B" to unnamed module & --add-opens com.A/com.B=ALL-UNNAMED

JDK17:module java.base does not “opens java.lang.reflect“ to unnamed module
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
Run/Debug Configurations->Configuration-> VM options: --add-opens java.base/java.lang.reflect=ALL-UNNAMED

Example 02
Unable to make public java.lang.String com.d.s.f.TestFastJson$Person.getName() accessible: module com.d.s does not "opens com.d.s.f" to unnamed module @6af93788
 

go to -> Run/Debug Configurations->Configuration-> VM options: --add-opens java.base/java.lang.reflect=ALL-UNNAMED
 

--add-opens com.d.s/com.d.s.f=ALL-UNNAMED

 

Reference:
h ttps://www.cnblogs.com/stcweb/articles/15114266.html
h ttps://www.cnblogs.com/stcweb/articles/15114266.html
https://blog.csdn.net/cs779193543/article/details/121502196

评论

此博客中的热门博文

XML, XSL, HTML

Input in element.eleme.io

How do I load binary image data using Javascript and XMLHttpRequest?