0

我正在使用 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)

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

4

0 回答 0