运行Idea时,控制台出现如下错误提示,不影响程序运行结果,但一直提示看着难受。
解决方案:
在Idea->run->edit configurations->VM options中添加参数:
–illegal-access=deny --add-opens java.base/java.lang=ALL-UNNAMED
即可,意思是If the reflecting code is in a named module, ALL-UNNAMED can be replaced by its name.