使用Apache POI时出现异常

时间:2013-10-16 17:11:11

标签: java exception apache-poi

我正在使用Apache POI而我正在运行此代码

POIFSFileSystem fs = null;

fs = new POIFSFileSystem(new FileInputStream("myDoc"));
HWPFDocument document = new HWPFDocument(fs);
WordExtractor word = new WordExtractor(document);
String[] paragraphs = word.getParagraphText();
System.out.println( "First paragraph text: " + paragraphs[0]);

它给了我这个例外。

Exception in thread "main" java.io.FileNotFoundException: myDoc (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)

现在我该如何解决这个问题。

0 个答案:

没有答案