WARNING: An illegal reflective access operation has occurred
在运行java程序时有这个警告,虽然不影响运行,看着着实不爽,可以通过以下方式解决。
来自 https://blog.csdn.net/nangu0673/article/details/82820494 评论区
在JVM options 添加下面的参数就好了(意思是:If the reflecting code is in a named module, ALL-UNNAMED can be replaced by its name.): --illegal-access=deny --add-opens java.base/java.lang=ALL-UNNAMED
# 参数要放在前面以防止和其他参数混淆
java --illegal-access=deny --add-opens java.base/java.lang=ALL-UNNAMED -jar xxx.jar