I'm trying to read a word file .. but actually there is a problem it says that " The type org.apache.xmlbeans.XmlException cannot be resolved. It is indirectly referenced from required .class files " .. so can I know the problem ??
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.*;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
public class Read_File {
public static void main(String[] args) {
try {
FileInputStream fis = new FileInputStream("C:\\Users\\Desktop\\m.docx");
org.apache.poi.xwpf.extractor.XWPFWordExtractor oleTextExtractor = new XWPFWordExtractor(new XWPFDocument(fis));
System.out.print(oleTextExtractor.getText());
} catch (Exception e) {
e.printStackTrace();
}
}
}