java.lang.NoClassDefFoundError while creating a .xlsx file using Apache POI

前端 未结 5 662
伪装坚强ぢ
伪装坚强ぢ 2021-01-23 16:21

I am trying to create a .xlsx file using Apache POI. This is my code:

FileOutputStream outputStream1=null;
XSSFWorkbook workbook = new XSSFWorkbook();
XSSFSheet          


        
5条回答
  •  萌比男神i
    2021-01-23 16:59

    Cause of NoClassDefFoundError is: Definition of class specified in exception was need to execute the code, but it could not be found under the specified package.

    Root cause: Usually it turns out that either jar file containing that Class definition was added or it was not added to build path.

    You can download apache POI jars for various releases here

提交回复
热议问题