gluon - maven-client-plugin、GraalVM 和类初始化
问题描述
我正在尝试使用 GluonHQ client-maven-plugin生成 JavaFX+FXML 应用程序的本机映像。创建本机映像工作正常,但在尝试执行它时,似乎我的配置错误。
FXML
<?import java.lang.*?>
<?import org.prelle.javafx.NavigationView?>
<?import org.prelle.javafx.NavigationItem?>
<?import org.prelle.javafx.NavigationItemHeader?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.control.SeparatorMenuItem?>
<?import javafx.scene.layout.FlowPane?>
<NavigationView xmlns:fx="http://javafx.com/fxml"
stylesheets="@styles.css"
displayMode="AUTO">
</NavigationView>
执行失败
org.apache.logging.log4j.message.ParameterizedMessageFactory
ClassNotFoundException: org.prelle.javafx.NavigationView
现在我尝试添加我的reflectionconfig.json
[
{
"name" : "org.prelle.javafx.NavigationView",
"allDeclaredConstructors" : true,
"allPublicConstructors" : true
}
]
现在的问题是它不再编译了。相反,对于在构建时无意初始化的类,我得到 3 个错误- 例如javafx.scene.control.SkinBase或我的类org.prelle.javafx.skin.NavigationViewSkin的皮肤
我的 NavigationView 构造函数将皮肤显式设置为 NavigationViewSkin,因此调用空构造函数也会调用皮肤构造函数。
我做错了什么?我怎样才能避免这些错误?
编辑:我没有注意到我复制了一条较旧的错误消息(由于 Log4J2 出现问题)。改变了它。
解决方案
推荐阅读
- sql - SAP HANA 过程动态 SQL 选择变量:不工作
- javascript - 如何使用来自 Filterbar 控件的多个过滤器输入值过滤 odata 服务并将过滤后的结果集绑定到表
- google-cloud-platform - 更新 BigQuery 永久外部表
- json - Golang:将 json 对象解组为切片
- c# - 无法在数组中搜索最大值
- java - Java Graphics2D - 放大鼠标位置
- javascript - 基于其他字段条件逻辑的MongoDB聚合项目
- java - 在 JNA 中加载 DLL 时找不到指定的模块
- node.js - 在网络上为 VueJS 服务器设置域
- abap - 如何以编程方式判断系统是 R/3 还是 S/4