tags:

views:

222

answers:

3

Hi I like to know what is rmic in RMI and how does it create proxies for me..

A: 

rmic is a Java RMI compiler.

See here for more information.

missingfaktor
Doesn't really answer the question.
EJP
+7  A: 

To answer your question, rmic [Solaris, Windows] is the Java RMI compiler and it generates stubs, skeletons, ties for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL. Regarding the how, your question is a bit vague but the answer might be something like it complies to the JRMP protocol or IIOP protocol or CORBA IDL specification.

Have look at the provided link(s) for a description of these various concepts. If this sounds like Chinese to you, you should probably look at the RMI tutorial. The first chapter of the tutorial covers RMI concepts.

Also note that (from the tutorial):

With versions prior to Java Platform, Standard Edition 5.0, an additional step was required to build stub classes, by using the rmic compiler. However, this step is no longer necessary.

So if your RMI server doesn't have to support clients running on pre-5.0 VMs, you actually don't need to worry about rmic.

Another good resource to get started is... Getting Started Using Java RMI, a Hello World sample for RMI.

If you want to get more information, check out the Remote Method Invocation spec.

Pascal Thivent
'So if your RMI server doesn't have to support clients running on pre-5.0 VMs' *and* you aren't using RMI/IIOP, you don't need rmic.
EJP