To answer your question, rmic [ Solaris , Windows ] is a Java RMI compiler and generates stubs, skeletons, communications for remote objects using the JRMP or IIOP protocols. Also generates OMG IDL. As for how, your question is a bit vague, but the answer may be something like this conforming to the JRMP protocol or the IIOP protocol or the CORBA IDL specification.
See the provided link (s) for a description of these various concepts. If this sounds Chinese to you, you should probably take a look at the RMI tutorial . The first chapter of the tutorial covers the concepts of RMI.
Also note that (from the tutorial):
With versions prior to the Java Platform Standard Edition 5.0, an additional step is required to create stub classes using the rmic compiler. However, this step is no longer needed.
So, if your RMI server does not need to support clients running on the pre-5.0 VM, you do not need to worry about rmic .
Another good resource to get started is ... Getting Started Using Java RMI , Hello World Sample for RMI.
For more information, see the Remote Method Call Specification .
source share