rmic(1)

NAME
rmic - Java RMI stub compiler

SYNOPSIS
rmic [ -bootclasspath path ] [ -classpath path ]
[ -d directory ] [ -depend ] [ -extdirs path ] [ -g ]
[ -idl ] [ -iiop ] [ -keepgenerated ] [ -J ]
[ -nowarn ] [ -sourcepath path ] [ -vcompat ]
[ -verbose ] [ -v1.1 ] [ -v1.2 ]
package-qualified-class-names

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 have compiled successfully with the javac(1) command and be fully package-qualified. For example, running rmic on the class file name HelloImpl as shown here:

    example% rmic hello.HelloImpl

creates the HelloImpl_Skel.class and HelloImpl_Stub.class files.

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

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

The stub implements only the remote interfaces, not local interfaces also implemented by the remote object. Because the stub implements exactly the same set of remote interfaces as the remote object, a client can use the Java language's built-in operators for casting and type-checking.

OPTIONS
The following options are supported:

-bootclasspath path
    Overrides location of bootstrap class files.

-classpath path
    Specifies the path rmic uses to look up classes. Setting this option overrides the default or the CLASSPATH environment variable. 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. If omitted, the root defaults to the current directory.

-depend
    Causes the compiler to recompile classes referenced by other classes. Normally, the compiler only recompiles missing or out-of-date classes referred to from source code.

-extdirs path
    Overrides location of installed extensions.

-g  Enables debugging table generation. Debugging tables contain information about line numbers and local variables. This information is used by Java debugging tools. By default, only line numbers are generated.

-idl
    Causes rmic to generate OMG IDL for the classes specified and any classes referenced. IDL provides a purely declarative, programming language-independent way of specifying an object's API. The IDL is used as a specification for methods and data that can be written in and invoked from any language that provides CORBA bindings. This includes Java and C++ among others. When the -idl option is used, other options also include:

    -always or -alwaysgenerate
        Forces re-generation even when existing stubs/ties/IDL are newer than the input class.
    -factory
        Uses factory keyword in generated IDL.
    -idlModule fromJavaPackage[.class] toIDLModule
        Specifies IDLEntity package mapping. For example:

        -idlModule foo.bar
        my::real::idlmod.

    -idlFile fromJavaPackage[.class] toIDLFile
        Specifies IDLEntity file mapping. For example:

        -idlFile test.pkg.X TEST16.idl

-iiop
    Causes rmic to generate IIOP stub and tie classes, rather than JRMP stub and skeleton classes. A stub class is a local proxy for a remote object and is used by clients to send calls to a server. Each remote interface requires a stub class, which implements that remote interface. A client's reference to a remote object is actually a reference to a stub. Tie classes are used on the server side to process incoming calls and dispatch the calls to the proper implementation class. Each implementation class requires a tie class.

    Invoking rmic with -iiop generates stubs and ties that conform to this naming convention:

    _<implementationName>_stub.class

    _<interfaceName>_tie.class

    When the -iiop option is used, other options also include:

    -always or -alwaysgenerate
        Forces re-generation even when existing stubs/ties/IDL are newer than the input class.
    -nolocalstubs
        Does not create stubs optimized for same-process clients and servers.
    -noValueMethods
        Must be used with the -idl option. Prevents addition of valuetype methods and initializers to emitted IDL. These methods and initializers are optional for valuetypes and are generated unless the -noValueMethods option is specified when using the -idl option.
    -poa
        Changes the inheritance from org.omg.CORBA_2_3.portable.ObjectImpl to org.omg.PortableServer.Servant.
        The PortableServer module for the Portable Object Adapter (POA) defines the native Servant type. In the Java programming language, the Servant type is mapped to the Java org.omg.PortableServer.Servant class. It server as the base class for all POA servant implementation and provides a number of methods that may be invoked by the application programmer, as well as methods which are invoked by the POA itself and may be overridden by the user to control aspects of servant behavior. Based on the OMG IDL to Java Language Mapping Specfication, CORBA V 2.3.1 ptc/00-01-08.pdf.

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

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

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

-sourcepath path
    Specifies where to find user source files.

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

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

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

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

ENVIRONMENT VARIABLES

CLASSPATH
    Used to provide the system with a path to user-defined classes. Directories are separated by colons. For example,

    .:/usr/local/java/classes