0
点赞
收藏
分享

微信扫一扫

IdleStateHandler 心跳机制源码详解

冶炼厂小练 2023-12-04 阅读 36

报错

2023-11-30T01:08:18.744+0800 [ERROR] [system.err] WARNING: An illegal reflective access operation has occurred
2023-11-30T01:08:18.745+0800 [ERROR] [system.err] WARNING: Illegal reflective access by com.intellij.ui.JreHiDpiUtil to method sun.java2d.SunGraphicsEnvironment.isUIScaleEnabled()
2023-11-30T01:08:18.745+0800 [ERROR] [system.err] WARNING: Please consider reporting this to the maintainers of com.intellij.ui.JreHiDpiUtil
2023-11-30T01:08:18.745+0800 [ERROR] [system.err] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
2023-11-30T01:08:18.745+0800 [ERROR] [system.err] WARNING: All illegal access operations will be denied in a future release
2023-11-30T01:08:19.394+0800 [ERROR] [system.err] 2023-11-30 01:08:19,393 [    795]   WARN - j.internal.DebugAttachDetector - Unable to start DebugAttachDetector, please add `--add-exports java.base/jdk.internal.vm=ALL-UNNAMED` to VM options 

环境

jdk azul-13.0.14
org.jetbrains.intellij 1.5.2
gradle 7.4.2

解决

Illegal reflective access by com.intellij.ui.JreHiDpiUtil to method sun.java2d.SunGraphicsEnvironment.isUIScaleEnabled()
意思是在JreHiDpiUtil 类中非法使用了反射访问SunGraphicsEnvironment.isUIScaleEnabled()方法

类似的还有
Illegal reflective access by com.intellij.ide.ui.laf.darcula.DarculaLaf to field javax.swing.text.html.HTMLEditorKit.DEFAULT_STYLES_KEY

要么更换包要么只能接收这个警告

可以使用jvm参数查看更加详细的信息
--illegal-access=debug --add-opens java.base/java.lang=ALL-UNNAMED
如果不想所有的配置都添加这个参数可以在自定义vm惨出生中添加
在这里插入图片描述

参考链接

举报

相关推荐

0 条评论