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 ................../>