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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM