Apache POI JDK version

2019-07-15 22:19发布

问题:

I was looking for examples on how to create an XML File in ANT for Java project using Apache POI library. I encountered this statement:

POI 3.5 and later requires the JDK version 1.5 or later. Versions prior to 3.5 require JDK 1.4+ here

I am using Apache 3.9 and set the JDK of my project to Java 1.4 and I didn't encounter any error when trying to run my program via eclipse. But my question is if I make build.xml in ANT and deploy the JAR file. Will my project still run(3)?

Extra info

  1. I created a build.xml using the ANT plugin in eclipse then Run as --> Ant Build. I didn't encounter any error.
  2. Also set the JRE to JDK1.4
  3. I haven't tested this yet if it runs or not because I still don't know how to add a JAR configuration in build.xml... I am still learning how to use ANT.

回答1:

If the project states that JDK 1.5 or higher is required it means that usually no testing is done with lower versions. It might still work (to some degree) as you found out, but likely will stop working with newer version of Apache POI.