我正在使用 Apache POI 处理 excel 文件,根据这篇文章 JDK9: An illegal reflective access operation has occurred. org.python.core.PySystemState,从 Java 9 开始我收到这条消息我们应该等待开发人员解决这个问题,但我应该在我的新生产版本中保留它吗?我认为如果我跳过警告应该没有问题。
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.util.DocumentHelper (file:/T:/Workspace/Java/Sections%20Manager/libs/poi/poi-ooxml-3.17.jar) to method com.sun.org.apache.xerces.internal.util.SecurityManager.setEntityExpansionLimit(int)
WARNING: Please consider reporting this to the maintainers of org.apache.poi.util.DocumentHelper
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
最佳答案
添加更新的“poi-ooxml”依赖项。它将解决所有上述警告。
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.0</version>
</dependency>
关于java - Apache POI 发生了非法的反射访问操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50071996/