【发布时间】:2018-06-11 07:22:09
【问题描述】:
运行混淆的 jar 后出现以下错误:
原因:java.io.UncheckedIOException:加载 FXML 时出错:/fxml/main.fxml
引起:javafx.fxml.LoadException: 未知路径
但 FXML 文件存在于指定路径。
我的 ProGuard 配置文件包含以下规则:
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod,javafx.fxml.FXML
-adaptresourcefilenames **.fxml,**.png,**.css,**.pdf,**.ttf,**.otf,**.txt
-adaptresourcefilecontents **.png,**.css,**.pdf,**.ttf,**.otf,**.txt
-adaptresourcefilecontents **.fxml,**.properties,META-INF/MANIFEST.MF
-adaptclassstrings
-keepclassmembernames class * {@FXML *;}
【问题讨论】:
标签: javafx proguard obfuscation fxmlloader