I have a problem with an obfuscated program. I have 2 files:
- client.jar
- server.jar
When I use Proguard to shrink them, it works fine. But if I check “optimize” I have NullPointerExceptions, and if I also check “obfuscate”, I have an InternalError in my client.jar when it has to send an object to the server with the writeObject() method.
Please can you help me with the configuration of Proguard (I don’t really know this tool) or tell me why I get those errors. Thanks per advance.
PS: I’m french so I’m sorry if I made mistakes in my explanations.
I tried to launch my client.jar with a .bat to see if I can see what’s going on and that’s the error I get when the client has to send the object to the server:

The question has few details, so my answer will be very general, but I hope it starts you in the right direction.
If you do any reflection to call methods, you’ll need to add
keepoptions to your configuration file. You need tokeepall the methods that ever get called via reflection (see Keep Options in the manual).For serialization, there is a recipe in the manual that should help:
Incremental obfuscation options will keep the obfuscation consistent between client and server; see this section of the Proguard manual.
Hope that helps.