Using RMI - RetroGuard Documentation


Prev   Contents   Next

As with serialization, remote method invocation (RMI) has some subtleties. A good starting point is the tutorial at Sun.

To preserve the necessary classes, methods, and fields for RMI to work correctly after obfuscation, add a script line:

.option RMI

This is exactly equivalent to the script lines:

.option Serializable
.class ** protected extends java/rmi/Remote
.class **_Stub
.class **_Skel

So, in addition to all the preservations needs to pass serialized objects using RMI, the RMI 'stubs' and 'skeletons' are preserved, along with any classes that implement Remote and the public and protected methods and fields in those Remote classes.

With this RMI option in place, it is even possible for communication to occur between an obfuscated RMI client and an non-obfuscated RMI server.


Prev   Contents   Next
 Copyright © 1998-2007 Retrologic Systems.
 All rights reserved.