首先,我必须下载 tika-bundle-0.9.jar 但我找不到它。其次,我写了这些
try {
URL itemURL = new URL("");
DataInputStream daHTMLfromDaItem = new DataInputStream(itemURL.openStream());
Tika tika = new Tika();
Metadata metadata = new Metadata();
Reader reader = tika.parse(daHTMLfromDaItem, metadata);
String s=reader.toString();
//System.out.print(s);
} catch (Exception e) {
e.printStackTrace();
}
错误
Error(5,24): cannot access class org.apache.tika.Tika; class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0
Error(6,33): cannot access class org.apache.tika.metadata.Metadata; class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0
Error(15,13): class Tika not found in class mypackage.TikaParsing
Error(15,29): class Tika not found in class mypackage.TikaParsing
Error(16,13): class Metadata not found in class mypackage.TikaParsing
Error(16,37): class Metadata not found in class mypackage.TikaParsing
另外,我不得不说我添加了所有必要的库,除了 tika-bundle-0.9.jar 。由于 tika-bundle-0.9.jar 是否会出现一些问题,我如何找到 tika-bundle-0.9.jar?我找不到解决方案。
谢谢