apache POI java.lang.NoClassDefFoundError: org/apache/commons/compress/archivers/zip/ZipFile

前端 未结 2 1925
清酒与你
清酒与你 2020-12-03 22:44

I try to make word document using Apache POI 4.0.0, but i get error

Exception in thread \"AWT-EventQueue-0\" java.lang.NoClassDefFou

相关标签:
2条回答
  • 2020-12-03 23:13

    For poi-4.1.0 I had to add these to the classpath: dom4j-1.6.jar xmlbeans-3.1.0.jar commons-collections4-4.3.jar commons-compress-1.18.jar Only then did this work for Excel.xlsx File:

    ExcelWBook = new XSSFWorkbook(ExcelFile);
    
    0 讨论(0)
  • 2020-12-03 23:19

    Try searching for the class name then jar download you might find the specified jar files. "ex: XWPF jar files download." and download the classes of XWPF as jar files i got this problem before and I solved it like this but for me it was pdfBox. PS: Try searching for jar files for "org.apache.poi.xwpf" you will get more results.

    0 讨论(0)
提交回复
热议问题