错误:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.poi.poifs.filesystem.POIFSFileSystem.getRoot()Lorg/apache/poi/poifs/filesystem/DirectoryEntry;
at org.textmining.text.extraction.WordExtractor.extractText(WordExtractor.java:51) at WordReader.readDoc(WordReader.java:18) at WordReader.main(WordReader.java:25)原因是:
据说这是poi.jar与tm.jar包方法冲突:poi.jar已有tm.jar包的方法(not sure...)
这两个包的顺序不对,应该先把tm-extractor.jar 放到 poi.jar包之前:
方法:properties->java build path->order and export 然后移动tm-extractor包位置:
改成:
如此调换顺序,结果如意输出了