0

I got the following error after running obfuscated jar:

Caused by: java.io.UncheckedIOException: Error loading FXML: /fxml/main.fxml

Caused by: javafx.fxml.LoadException: unknown path

But the FXML file is exists on the specified path.

My ProGuard config file contains following rules:

-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 *;}
Community
  • 1
  • 1
M.Fooladgar
  • 374
  • 1
  • 4
  • 17

1 Answers1

0

This question was duplicate; Here is the answer to this question:

The problem is that FXML cannot import classes that do not start with an upper case letter. Therefore one has to provide an own list of available names that ProGuard uses for obfuscating.

More details at: https://stackoverflow.com/a/29374932/2627659

M.Fooladgar
  • 374
  • 1
  • 4
  • 17