java - 运行 Kotlin 时这些非法访问警告是什么以及如何阻止它们?
问题描述
我是 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 version 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
推荐阅读
- php - 无论我的ini文件服务器时区如何,如何获取我的本地时区
- java - 为什么 java.util.ArrayList 包中的数据数组是私有的?
- python - 创建 Python 循环以查找开始和停止值
- json - golang解组未知的json数据
- ruby-on-rails - 带有 gitlab CI/CD 的 Rails .env
- ios - 广告活动归因,在 iOS 中使用 Firebase Analytics 将广告活动信息发送到 Google 标签管理器
- flutter - 如何在 Flutter Bloc 中进行拉动刷新(LiquidPullToRefresh)时刷新当前页面
- facebook - “请更新您的隐私政策以符合我们的平台条款”我有隐私政策链接
- android - TextView 电子邮件后缀“.com”换行(无需 breakStrategy 即可修复)
- python - Pandas 数据框合并为匹配列提供了奇怪的输出