- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在 Eclipse 2019-06 中使用 java/javafx 12 开发一个模块化 java 项目,使用混合模块化和非模块化方法。由于运行时异常,无法使程序运行。
我需要使用混合模块化和非模块化方法,因为该程序需要外部库。它们中的大多数都作为模块提供,但 jOpenDocument 并未由开发人员作为模块提供。
除了“自动模块 jOpenDocument 的名称不稳定”之外,我没有收到 Eclipse 的任何提示,这不应该是问题所在。
当我启动程序时,出现以下异常:
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\Users\ct\eclipse-workspace-2019-06\DMModule2\lib\jOpenDocument-1.4rc2.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: JDOMAbout$Info.class found in top-level directory (unnamed package not allowed in module)
我在模块路径、模块信息中拥有所有外部 jar文件如下所示。
使用非模块化方法该项目可以顺利运行,但我想继续使用模块。我发现这两个引用文献针对同一类问题
Mixed Modular and Non-Modular Development in Eclipse using Java 11
What do I need to build JDK 9 project with non-modular dependencies using Maven
但没有帮我解决。
jOpenDocument 的源代码已可用 https://jopendocument.org/download/jOpenDocument-src-1.4rc2.zip ,因此将 jar 更新为模块通过添加 module-info 文件是可行的。我也尝试过,但没有成功,如果有人能做到这一点,我认为这对社区会有帮助。
module dmmodule2 {
exports dmmodule;
exports gui;
// sql
requires transitive java.sql;
// Json
requires transitive org.glassfish.java.json;
// jOpenDocument
requires transitive jOpenDocument;
// JavaFX;
requires javafx.fxml;
requires transitive javafx.graphics;
requires transitive javafx.controls;
opens dmmodule to javafx.fxml;
opens gui to javafx.fxml;
}
有没有人能提供一个提示,让我的模块化项目能够通过使用可用的 jOpenDocument 二进制 jar 或将其从源代码转换为模块来工作?
最佳答案
这是一个与 JDOM 相关的问题,我们将在下一版本的 jOpenDocument 中看看我们能做什么。
关于java - 模块化项目使用 jOpenDocument 引发 InvalidModuleDescriptorException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58299534/
当我使用 JOpenDocument 解析 .ods 文件时遇到问题。我的文件中有 3 行和 4 列,但是当我解析此文件时,我得到 1024 列和太多行。有很多空白单元格。 我像 xml 一样打开了这
我正在 Eclipse 2019-06 中使用 java/javafx 12 开发一个模块化 java 项目,使用混合模块化和非模块化方法。由于运行时异常,无法使程序运行。 我需要使用混合模块化和非模
我有一个 .ods 文件,想要使用 jOpenDocument (Java) 将其导出为 PDF。 我使用以下代码: // load the ODS
我尝试将 Gradle 与此“org.jopendocument:jOpenDocument:1.3b1”一起使用,但出现此错误: 此 Gradle 文件 (1) 因以下错误而失败: Error:(2
我在编码方面遇到了一点挑战。 File file = new File("template.ods"); Sheet sheet; try { // load file sheet =
我正在尝试使用 jOpenDocument library创建文档。我已经执行了创建电子表格的示例 - 代码编译并运行正常,但当我尝试使用 Excel Office 2012 或 Google Doc
我正在使用 jOpenDocument 库处理 .ods 电子表格。由于我处理的是字符串,所以一切都很好,但是当涉及到处理数字时,就很痛苦了。 在我的代码中,我迭代电子表格并根据索引 x,y 处的单元
我是一名优秀的程序员,十分优秀!