jar包下载
说明:下载之后,解压
FileInputStream fis = new FileInputStream(new File("D:\\课件\\2009-2010(1)\\JAVA程序设计\\上机任务.doc"));
WordExtractor word=new WordExtractor(fis);
String text=word.getText();
text=text.replaceAll(" ", "");
// System.out.println(text);
System.out.println("共有字符数:"+text.length());
System.out.println(text);