Spec-Zone .ru
спецификации, руководства, описания, API

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). 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. 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.

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 also implements. 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 path rmic uses to look up classes. This option overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for path is:
.:<your_path>
For example:
.:/usr/local/java/classes
-d directory
Specifies the root directory of the class hierarchy. You can use this option to specify a destination directory for the stub and skeleton files. For example, the command
% rmic -d /java/classes foo.MyClass
would place the stub and skeleton classes derived from MyClass into the directory /java/classes/foo. If the -d option is not used, the package hierarchy of the target class is ignored, and stub and skeleton files are placed in the current directory.
 
-depend
Makes the compiler consider recompiling classes which are referenced from other classes. Normally, it only recompiles missing or out-of-date classes that are referred to from source code.
-g
Enables generation of debugging tables. Debugging tables contain information about line numbers and local variables - information used by Java debugging tools. By default, only line numbers are generated.

-J
Used in conjunction with the -D option, it passes the option following it (no spaces between the -J and -D) on to the java interpreter.

-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.

-nowarn
Turns off warnings. If used the compiler does not print out any warnings.

-show
Shows the GUI (graphical user interface) for the rmic compiler. Enter 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.

-vcompat
(default) Creates stubs and skeletons compatible with both JDK 1.1 and 1.2 stub protocol versions.

-verbose
Causes the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded.

-v1.1
Create stubs and skeletons for JDK 1.1 stub protocol version.

-v1.2
Create stubs for JDK 1.2 stub protocol version only.

ENVIRONMENT VARIABLES

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

SEE ALSO

javac, CLASSPATH