当我试图执行以下的任何代码
File someFile = new File("D:\\arz.doc");
InputStream inputStrm = new FileInputStream(someFile);
HWPFDocument wordDoc = new HWPFDocument(inputStrm);
System.out.println(wordDoc.getText());
要么:
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("D:\\arz.doc"));
WordExtractor extractor = new WordExtractor(fs);
String wordText = extractor.getText();
,该错误信息永远是如下:
Exception in thread “main” java.lang.NoSuchMethodError:
org.apache.poi.poifs.filesystem.POIFSFileSystem.getRoot()Lorg/apache/poi/poifs/filesystem/DirectoryNode;
at org.apache.poi.hwpf.HWPFDocument.(HWPFDocument.java:186)
at DB_connect.dissertation_araalz.ParseWodDocFile.main(ParseWodDocFile.java:29)
Java Result: 1
BUILD SUCCESSFUL (total time: 3 seconds)
你能帮我这个问题?