rmic - The Java RMI Stub Compiler

rmic generates stubs and skeletons for remote objects.

SYNOPSIS

rmic [ options ] package-qualified-class-name(s)

DESCRIPTION

The rmic compiler generates stub and skeleton class files for remote objects from the names of compiled Java classes that contain remote object implementations (a remote object is one that implements the interface java.rmi.Remote). rmic takes one or more class names as input and produces as output class files of the form myImpl_Skel.class and myImpl_Stub.class. For example, running rmic on the class file name HelloImpl as shown here:
rmic hello.HelloImpl

creates the HelloImpl_Skel.class and HelloImpl_Stub.class files in the current directory.

The classes named in the rmic command must be classes that have been compiled successfully with the javac command and must be fully package qualified.

A skeleton for a remote object is a server-side entity that contains a method which dispatches calls to the actual remote object implementation.

A stub is a proxy for a remote object which is responsible for forwarding method invocations on remote objects to the server where the actual remote object implementation resides. A client's reference to a remote object, therefore, is actually a reference to a local stub.

The stub implements only the remote interfaces, not any local interfaces that the remote object happens to implement. Because the stub implements exactly the same set of remote interfaces as the remote object itself, a client can use the Java language's built-in operators for casting and type checking.

OPTIONS

-classpath path

Specifies the location of imported classes. This option overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons on UNIX and Macintosh and by semicolons on WIN95. For example, on UNIX the general format for path is:
.:<your_path>
For example:
.:/usr/local/java/classes

-d directory

Writes the stub and skeleton files to the specified directory. If ommitted, files are written to the current directory.

-keepgenerated

Retains the generated .java source files for the stubs and skeletons and writes them to the same directory as the .class files, using the -d option if specified.

-show

Shows the GUI (graphical user interface) for the rmic compiler. Enter the one or more package qualified class names (separated by spaces) and press either the Enter key or the Show button to create stubs and skeletons.

ENVIRONMENT VARIABLES

CLASSPATH
Used to provide the system a path to user-defined classes. Directories are separated by colons on UNIX and Macintosh and by semicolons on Win95. For example,
.:/usr/local/java/classes

SEE ALSO

The javac command for Solaris and the javac command for Win32.