2

So I successfully imported a custom class in my .fxml class as follows

<?import com.company.project.controller.myCustonClass?>

Everything works fine and my program works as expected. After I added pro guard to my application, the program doesn't work. I get an

FXMLLoadException

The details of the exceptions are give below [ taken from log.out ]

myCustonClass is not a valid type.
file:/F:/xxxxx/xxx/xxx/project-name/target/jfx/app/project-name.jar!/fxml/MyScreen.fxml:21

I have found a workaround for this one. I just add an exception in the .conf file like this

-keep class com.company.project.controller.myCustonClass

Is this the only way to handle the problem. The class name looks kind of weird in the debugger, while every other class has been 'obfuscated'

As suggested in ProGuard breaks JavaFX application, i have added a .txt file with capital alphabets, yet my application doesn't work.

I used a debugger JD-GUI and i see all the obfuscated class names have capital alphabets. So it doesn't look like an issue with 'fxml unable to load class names with small letter'

Update: I used another debugger 'jadx' and I see the import statement :

import com.company.project.b.A

but in the .fxml file I see the tag

<CustonClass ................../>
  • 1
    Possible duplicate of [ProGuard breaks JavaFX application](https://stackoverflow.com/questions/29307262/proguard-breaks-javafx-application) – Slaw Sep 17 '18 at 15:27
  • I have already gone through the link and I have followed whatever the accepted solution suggested in the link, and it still doesn't seem to work. I will update the question with more details. Thank you – Gopalakrishna Kini Sep 17 '18 at 16:01

0 Answers0