NoClassDefFoundError while using api XSSF
I want to read an xlsx fi开发者_C百科le using api XSSF. For that I downloaded poi-3.6 api and then did set the correct classpath but then too when I run my program I get an Exception as in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook
But I can read xls file using HSSF api without any exception.
java.lang.NoClassDefFoundError
is always a classpath issue: java can't find the class org/apache/poi/xssf/usermodel/XSSFWorkbook
on the classpath while executing your main method.
The class is inside the poi-ooxml-3.6-xxx.jar. Double check if this lib is really on the classpath.
精彩评论