I\'m using Apache POI to work with excel files, as of Java 9 I get this message, according to this post JDK9: An illegal reflective access operation has occurred. org.python
The error I encountered was : WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.poi.util.DocumentHelper (file:/D:/Libary/poi-3.12/poi-ooxml-3.12-20150511.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
please use poi-3.6 or a later version,I use poi-3
Add the updated "poi-ooxml" dependency. It will resolve all the above warnings.
<!-- 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>