我正在尝试读取一个word文件,然后将其存储在我的数据库中。 为此,我正在使用 APACHI POI
http://sanjaal.com/java/tag/java-and-docx-format/
我已在构建路径中添加了所需的 jar,没有导入错误
但是当我运行/编译我的应用程序时,它说:
[ERROR] Line 22: No source code is available for type org.apache.poi.poifs.filesystem.POIFSFileSystem; did you forget to inherit a required module?
[ERROR] Line 24: No source code is available for type java.io.FileInputStream; did you forget to inherit a required module?
[ERROR] Line 25: No source code is available for type org.apache.poi.hwpf.HWPFDocument; did you forget to inherit a required module?
[ERROR] Line 47: No source code is available for type org.apache.poi.hwpf.extractor.WordExtractor; did you forget to inherit a required module?
[ERROR] Line 63: No source code is available for type org.apache.poi.hwpf.usermodel.HeaderStories; did you forget to inherit a required module?
[ERROR] Line 77: No source code is available for type org.apache.poi.hpsf.DocumentSummaryInformation; did you forget to inherit a required module?
任何想法我错过了什么
谢谢
最佳答案
GWT 不是一个完整的 JVM - 它是一个带有 Java 运行时环境子集的源预处理器,因此您不能随意使用您找到的任何 JAR。您将需要在服务器端进行所有处理和文本提取。
关于java - 在JAVA/GWT中读取Word文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23511248/