java - 在JAVA/GWT中读取Word文件

标签 java gwt apache-poi

我正在尝试读取一个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/

相关文章:

java - 我在通过 Apache POI 添加计算字段时遇到问题

java - 使用 POI 为多列创建不同的下拉列表

java - 使用颜色比例规则的 XSSFSheetConditionalFormatting 不会格式化使用 java 中的 poi 生成的 excel 中的数据

java - Vaadin 8.1 RC1 TreeDataProvider、TreeData (getParent)、HierarchicalQuery

java - 确定部署的Web应用程序版本

java - 如何从 JobScheduler 的 onStartJob 打开带有 ACTION_VIEW Intent 的 url

javascript - Jquery vs Google Closure va GWT 大型 Web 应用程序开发的优缺点

java - 悲观锁无法使用 spring data jpa

java - NumberFormat 数字后显示的文本/货币

java - 使用 GWT 计算负日期