小编orz*_*zel的帖子

JavaFX Proguard混淆

我正在努力处理JavaFX应用程序的混淆问题。以该项目为基础:

https://github.com/openjfx/samples/tree/master/IDE/IntelliJ/Non-Modular/Gradle

Proguard抛出此错误:

java.io.IOException: Can't write [Path\infile.jar] (Can't read [Path\outfile.jar] (Duplicate jar entry [a.class]))
Run Code Online (Sandbox Code Playgroud)

Proguard配置文件:-dontoptimize -dontshrink

-libraryjars 'E:\Prog\jdk-11.0.2\jmods'
-libraryjars 'E:\Prog\javafx-sdk\lib'

# Save meta-data for stack traces
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

# Rename FXML files together with related views
-adaptresourcefilenames **.fxml,**.png,**.css
-adaptresourcefilecontents **.fxml
-adaptclassstrings

# Keep all annotations and meta-data
-keepattributes *Annotation*,Signature,EnclosingMethod

# Keep entry-point class
-keep classpackage.App {
    public static void main(java.lang.String[]);
}

# Keep all classes inside application
-keep,allowobfuscation class package.** {
}

# Keep names of fields marked …
Run Code Online (Sandbox Code Playgroud)

obfuscation javafx proguard java-11 javafx-11

5
推荐指数
1
解决办法
875
查看次数

标签 统计

java-11 ×1

javafx ×1

javafx-11 ×1

obfuscation ×1

proguard ×1