我是 Kotlin 的新手,在运行任何脚本时,终端都会抛出这些警告。
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.util.ReflectionUtil to method java.util.ResourceBundle.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
这些是什么以及如何隐藏它们?
我正在使用 Kotlin 版本 1.4.21-release-351 (JRE 15.0.1+9-18)
如果有帮助的话
最佳答案
也遇到了这个问题,在 https://youtrack.jetbrains.com/issue/KT-43520 打开问题
https://github.com/yschimke/okurl-scripts/issues/3
目前,最好的选择是将 JAVA_HOME 设置为 1.8 而不是 9+。
https://raw.githubusercontent.com/yschimke/okurl-scripts/master/commands/tube-status.main.kts
$ ./tube-status.main.kts
Bakerloo Good Service
Central Good Service
Circle Minor Delays
District Part Closure
Hammersmith & City Minor Delays
Jubilee Good Service
Metropolitan Minor Delays
Northern Good Service
Piccadilly Part Closure
Victoria Good Service
Waterloo & City Planned Closure
关于java - 运行 Kotlin 时这些非法访问警告是什么以及如何阻止它们?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65677383/