您好,我在尝试使用HSSF工作簿时遇到错误。看到此错误
Exception in thread "Thread-13" java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
at digicare.tracking.serial.BulkUpload.UploadProgress$1read2.run(UploadProgress.java:95)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
这是我的代码:
try {
file = new FileInputStream(new File(FilePath));
try {
workbook = new HSSFWorkbook(file);
} catch (Exception e2){
JOptionPane.showMessageDialog(null, "Error1" + e2.getMessage());
}
//HSSFSheet sheet = workbook.getSheetAt(0);
//HSSFRow row;
//HSSFCell cell;
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(null, "Error1" + e1.getMessage());
} catch (IOException e) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(null, "Error2 "+ e.getMessage());
}
似乎每当我尝试使用工作簿部分时,它都会返回错误
答案 0 :(得分:0)