The java.lang.reflect.Proxy class will let you provide an arbitrary implementation for an interface.
So, start with that on the client. Figure out how to produce a factory for interface objects. Understand how the proxy invocation works.
Then, create a socket connection to the server. Wrap it with an ObjectInputStream/ObjectOutputStream.
Now you need to define a protocol between client and server. For example, let's say that the client sends an integer object ID, followed by a method name, followed by an array of parameters. The server needs to find the object, and invoke the appropriate method. Then it needs to send the result back to the client.
Then you can get into distributed GC ...
source: java dev forums