gpt4 book ai didi

java - 非法的反射访问操作会阻止程序运行吗?

转载 作者:行者123 更新时间:2023-11-29 04:18:26 25 4
gpt4 key购买 nike

我正在开发一个使用 java 和 flink 构建推文数据流的项目。当我运行该程序时,我收到此错误:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.flink.core.memory.HybridMemorySegment (file:/home/haydn/.m2/repository/org/apache/flink/flink-core/1.4.2/flink-core-1.4.2.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.apache.flink.core.memory.HybridMemorySegment
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

虽然程序似乎在之后运行,所以我只是想知道这个错误是否意味着任何东西都不会按预期工作,或者是否一切都会好起来的。

我注意到其他帖子中有人就如何隐藏消息提出了建议,这就是为什么我认为它并不重要。

谢谢:)

最佳答案

so I'm just wondering if this error means anything will not be working as intended, or if everything will be fine.

要检查这一点,您需要为您的应用程序编写测试。由于这只是一个警告,它本身不应破坏您的应用程序。

WARNING: All illegal access operations will be denied in a future release

这意味着您的应用程序现在可以工作,但一旦您将 JDK 升级到新版本,就会停止工作。由于 Java 9 中引入的模块概念,public 访问修饰符的含义与之前的 Java 版本不同。上面的警告意味着 Flink 库之一的代码试图访问未导出到该模块的属性 java.nio.Buffer.address

关于java - 非法的反射访问操作会阻止程序运行吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50748977/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com