lundi 19 septembre 2016

How to remove a method from a compiled Java class/jar file?

I have a JAR file and there is a static class, I can't decompile it, it gets messed up. There is one method in it, that returns a class, that doesn't exist. No idea how, but I'm getting NoClassDefFoundError. Even though I'm not using that method, it still crashes. So I need to somehow just remove it and it should work fine. I know Reflection or Javassist could be used, but no idea how.

Note, that this is obviously not for production release, just some white-hat hacking.





Aucun commentaire:

Enregistrer un commentaire