我正在使用XLConnect在R(版本3.4.4)中读入xlsx文件,但是我收到了下面的警告。我认为它们可能与Java有关,但我不是Java用户,我不知道如何让它们消失。谢谢!
使用任何xlsx文件的MWE:
library(XLConnect)
infile <- 'any.xlsx'
wb <- loadWorkbook(infile)
mydf <- readWorksheet(wb, sheet=1, region='A1:AS91', header=TRUE, check.names=FALSE, useCachedValues=TRUE)
警告:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.openxml4j.util.ZipSecureFile$1 (file:/usr/local/lib/R/site-library/XLConnect/java/poi-ooxml-3.17.jar) to field java.io.FilterInputStream.in
WARNING: Please consider reporting this to the maintainers of org.apache.poi.openxml4j.util.ZipSecureFile$1
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
发布于 2018-08-23 21:29:01
从错误报告中,我会告诉您使用的是Java 9或更高版本,不是吗?
此问题将在产生此警告的Apache POI 4.0.0的下一版本中得到解决。
在Apache POI 4.0.0发布之后,XLConnect的维护者将能够升级他们的依赖项。此时,您必须升级项目中的XLConnect版本,该警告将不会再出现。
或者,如果您不依赖最新版本来满足任何其他需求,则可以将已安装的Java运行时环境降级到JRE 1.8.161。
https://stackoverflow.com/questions/51719176
复制相似问题