Example Operation of rmic
An earlier example of a remote implementation class:
public class MessageWriterImpl extends UnicastRemoteObject
implements MessageWriter {
. . .
public void writeMessage(String s) throws RemoteException {
. . .
}
}
We issue the command:
rmic –v1.2 –keep MessageWriterImpl
- The flag –v1.2 avoids generation of unnecessary code, needed only for backward compatibility (including “skeleton classes”).
- The flag –keep causes the intermediate Java source to be retained.
Output files will be MessageWriterImpl_Stub.java and MessageWriterImpl_Stub.class.