New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaFX fxml support #46
Comments
Obfuscating FXML files is not explicitly supported. However, if you only need to adjust class names, you can try adding
to the rename element of your yguard task. yGuard is not able to adjust method names that are specified as event handlers in FXML, though. The other, more reliable option is to exclude class and method names that are used in FXML from obfuscation. |
@yanchikdev did this fix your issue? Can it be closed? |
@Fohlen Yeah, I excluded the controller from obfuscation and it worked. |
@Fohlen As long as yGuard does not support obfuscating method names in FXML files, I do not think an example is the proper place for providing this kind of information. I would prefer to have this piece of information as part of the yGuard documentation. |
Since |
@meetinger I've set up an example with FXML support. However there are two issues that currently need to be handled by hand:
I think this is a well enough tradeoff for obfuscation. Most of our use cases do not require "reflecting" the method names from a config. In contrary this is probably not desired, as during deployment / obfuscation you want to be very explicit what gets mapped. Is this as you imagined it and could this issue be closed with it? |
Closing this because of inactivity and because we see the current tradeoff as sufficient for most use cases. |
After obsufiaction, my jar does not start due to an error:
caused by: java.lang.ClassNotFoundException: com.example.Controller at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:920)
Because the name of the old class remains in the fxml file.
The text was updated successfully, but these errors were encountered: