您好在构建 xml 中遇到错误。从日志中我认为错误与 apache poi 库“poi-ooxml-3.9-20121203”和 Java 版本有关。我目前正在使用 JDK 4 和 apache poi 3.9。
Buildfile: C:\POITest\build.xml
init:
clean:
[delete] Deleting directory C:\POITest\build
[delete] Deleting directory C:\POITest\dist
init:
[mkdir] Created dir: C:\POITest\dist
[mkdir] Created dir: C:\POITest\build
[mkdir] Created dir: C:\POITest\dist\lib
compile:
[javac] C:\POITest\build.xml:38: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to C:\POITest\build
[javac] C:\POITest\src\poi\test\TestMain.java:8: cannot access org.apache.poi.openxml4j.exceptions.InvalidFormatException
[javac] bad class file: C:\POITest\lib\poi3-9\poi-ooxml-3.9-20121203.jar(org/apache/poi/openxml4j/exceptions/InvalidFormatException.class)
[javac] class file has wrong version 49.0, should be 48.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
[javac] import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
[javac] ^
[javac] 1 error
POI 罐子列表
/POITest/lib/poi3-9/commons-codec-1.5.jar
/POITest/lib/poi3-9/commons-logging-1.1.jar
/POITest/lib/poi3-9/dom4j-1.6.1.jar
/POITest/lib/poi3-9/junit-3.8.1.jar
/POITest/lib/poi3-9/log4j-1.2.13.jar
/POITest/lib/poi3-9/poi-3.9-20121203.jar
/POITest/lib/poi3-9/poi-examples-3.9-20121203.jar
/POITest/lib/poi3-9/poi-excelant-3.9-20121203.jar
/POITest/lib/poi3-9/poi-ooxml-3.9-20121203.jar
/POITest/lib/poi3-9/poi-ooxml-schemas-3.9-20121203.jar
/POITest/lib/poi3-9/poi-scratchpad-3.9-20121203.jar
/POITest/lib/poi3-9/stax-api-1.0.1.jar
/POITest/lib/poi3-9/xmlbeans-2.3.0.jar
如果您需要查看构建文件,请告诉我。谁能告诉我我需要做什么来解决这个问题。谢谢