Name
rmic: The Java RMI Compiler — JDK 1.1 and later
Synopsis
rmic [options
]fully-qualified-classnames
Description
The
rmic
compiler generates the
stub and skeleton classes for remote
objects that you’ve written. Once
you’ve compiled your remote objects using a standard
Java compiler, such as javac
, you need to run
rmic
, specifying the class names of your remote
implementation classes using their full packages.
For example, suppose you define an interface named
utils.remote.TimeServer
that extends
java.rmi.Remote
, and write an implementation of
this interface called utils.remote.TimeServerImpl.
After compiling both with a Java compiler, you can run
rmic
, specifying
utils.remote.TimeServerImpl
as the class-name
argument.
The native RMI remote method protocol, JRMP, was updated in Java 2
Version 1.2. The rmic
compiler in JDK 1.2 and
later supports the generation of stubs that are compatible with the
Version 1.1 of JRMP or both. A key difference between the two is that
1.1 required the generation of both stub and skeleton classes for a
remote interface, while 1.2 requires only the stub class is required
(the server-side skeleton operations are implemented dynamically by
the RMI runtime). The -vcompat
,
-v1.1
, and -v1.2
options,
described in the next section, control what flavor of stubs and
skeletons are generated when you run rmic
.
Running rmic
with 1.1 compatibility generates a
skeleton class for each remote object type, named
xxx_Skel
, where the xxx
is the name of the remote interface. ...
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.