4176N/A." Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A."
0N/A." This code is free software; you can redistribute it and/or modify it
0N/A." under the terms of the GNU General Public License version 2 only, as
0N/A." published by the Free Software Foundation.
0N/A."
0N/A." This code is distributed in the hope that it will be useful, but WITHOUT
0N/A." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A." version 2 for more details (a copy is included in the LICENSE file that
0N/A." accompanied this code).
0N/A."
0N/A." You should have received a copy of the GNU General Public License version
0N/A." 2 along with this work; if not, write to the Free Software Foundation,
0N/A." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A."
2362N/A." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A." or visit www.oracle.com if you need additional information or have any
2362N/A." questions.
0N/A."
4880N/A.TH rmic 1 "16 Mar 2012"
0N/A
0N/A.LP
1178N/A.SH "Name"
0N/Armic \- The Java RMI Compiler
0N/A.LP
0N/A.LP
0N/A\f3rmic\fP generates stub, skeleton, and tie classes for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL.
0N/A.LP
0N/A.SH "SYNOPSIS"
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/Armic [ \fP\f3options\fP\f3 ] \fP\f4package\-qualified\-class\-name(s)\fP\f3
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/A.SH "DESCRIPTION"
0N/A.LP
0N/A.LP
0N/AThe \f3rmic\fP compiler generates stub and skeleton class files (JRMP protocol) and stub and tie class files (IIOP protocol) for remote objects. These classes files are generated from compiled Java programming language classes that are remote object implementation classes. A remote implementation class is a class that implements the interface \f2java.rmi.Remote\fP. The class names in the \f3rmic\fP command must be for classes that have been compiled successfully with the \f3javac\fP command and must be fully package qualified. For example, running \f3rmic\fP on the class file name \f2HelloImpl\fP as shown here:
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/Armic hello.HelloImpl
0N/A.fl
0N/A\fP
0N/A.fi
0N/A
0N/A.LP
0N/A.LP
0N/Acreates the \f2HelloImpl_Stub.class\fP file in the \f2hello\fP subdirectory (named for the class's package).
0N/A.LP
0N/A.LP
0N/AA \f2skeleton\fP for a remote object is a JRMP protocol server\-side entity that has a method that dispatches calls to the actual remote object implementation.
0N/A.LP
0N/A.LP
0N/AA \f2tie\fP for a remote object is a server\-side entity similar to a skeleton, but which communicates with the client using the IIOP protocol.
0N/A.LP
0N/A.LP
0N/AA \f2stub\fP is a client\-side proxy for a remote object which is responsible for communicating 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.
0N/A.LP
0N/A.LP
0N/ABy default, \f3rmic\fP generates stub classes that use the 1.2 JRMP stub protocol version only, as if the \f2\-v1.2\fP option had been specified. (Note that the \f2\-vcompat\fP option was the default in releases prior to 5.0.) Use the \f2\-iiop\fP option to generate stub and tie classes for the IIOP protocol.
0N/A.LP
0N/A.LP
0N/AA stub implements only the remote interfaces, not any local interfaces that the remote object also implements. Because a JRMP stub implements the same set of remote interfaces as the remote object itself, a client can use the Java programming language's built\-in operators for casting and type checking. For IIOP, the \f2PortableRemoteObject.narrow\fP method must be used.
0N/A.LP
0N/A.SH "OPTIONS"
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/A\-bootclasspath path
0N/AOverrides location of bootstrap class files
0N/A.TP 3
0N/A\-classpath path
0N/ASpecifies the path \f3rmic\fP 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 \f2path\fP is:
0N/A.nf
0N/A\f3
0N/A.fl
0N/A.:<your_path>
0N/A.fl
0N/A\fP
0N/A.fi
0N/AFor example:
0N/A.nf
0N/A\f3
0N/A.fl
0N/A.:/usr/local/java/classes
0N/A.fl
0N/A\fP
0N/A.fi
0N/A.TP 3
0N/A\-d directory
0N/ASpecifies the root destination directory for the generated class hierarchy. You can use this option to specify a destination directory for the stub, skeleton, and tie files. For example, the command
0N/A.nf
0N/A\f3
0N/A.fl
0N/A% rmic \-d /java/classes foo.MyClass
0N/A.fl
0N/A\fP
0N/A.fi
0N/Awould place the stub and skeleton classes derived from \f2MyClass\fP into the directory \f2/java/classes/foo\fP. If the \f2\-d\fP option is not specified, the default behavior is as if \f2"\-d\ ."\fP were specified: the package hierarchy of the target class is created in the current directory, and stub/tie/skeleton files are placed within it. (Note that in some previous versions of \f3rmic\fP, if \f2\-d\fP was not specified, then the package hierarchy was \f2not\fP created, and all of the output files were placed directly in the current directory.)
0N/A.br
0N/A\
0N/A.TP 3
0N/A\-extdirs path
0N/AOverrides location of installed extensions
0N/A.TP 3
0N/A\-g
0N/AEnables generation of all debugging information, including local variables. By default, only line number information is generated.
0N/A.TP 3
0N/A\-idl
0N/ACauses \f2rmic\fP 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. See the
0N/A.na
0N/A\f2Java Language to IDL Mapping\fP @
0N/A.fi
4176N/Ahttp://www.omg.org/technology/documents/formal/java_language_mapping_to_omg_idl.htm (OMG) document for a complete description.
4176N/A.br
4176N/A.br
4176N/AWhen the \f2\-idl\fP option is used, other options also include:
1178N/A.RS 3
0N/A.TP 3
0N/A\-always or \-alwaysgenerate
0N/AForces re\-generation even when existing stubs/ties/IDL are newer than the input class.
0N/A.TP 3
0N/A\-factory
0N/AUses factory keyword in generated IDL.
0N/A.TP 3
1178N/A\-idlModule\ fromJavaPackage[.class]\ toIDLModule
0N/ASpecifies IDLEntity package mapping. For example:\ \f2\-idlModule foo.bar my::real::idlmod\fP.
0N/A.TP 3
1178N/A\-idlFile\ fromJavaPackage[.class]\ toIDLFile
1178N/ASpecifies IDLEntity file mapping. For example:\ \f2\-idlFile test.pkg.X TEST16.idl\fP.\
1178N/A.RE
0N/A.TP 3
0N/A\-iiop
4176N/ACauses \f2rmic\fP 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.
4176N/A.br
4176N/A.br
0N/AInvoking \f2rmic\fP with the \f2\-iiop\fP generates stubs and ties that conform to this naming convention:
0N/A.nf
0N/A\f3
0N/A.fl
0N/A_<implementationName>_stub.class
0N/A.fl
0N/A_<interfaceName>_tie.class
0N/A.fl
0N/A\fP
0N/A.fi
4176N/AWhen the \f2\-iiop\fP option is used, other options also include:
1178N/A.RS 3
0N/A.TP 3
0N/A\-always or \-alwaysgenerate
0N/AForces re\-generation even when existing stubs/ties/IDL are newer than the input class.
0N/A.TP 3
0N/A\-nolocalstubs
0N/ADo not create stubs optimized for same\-process clients and servers.
0N/A.TP 3
0N/A\-noValueMethods
0N/AMust be used with the \f2\-idl\fP option. Prevents addition of \f2valuetype\fP methods and initializers to emitted IDL. These methods and initializers are optional for \f2valuetype\fPs, and are generated unless the \f2\-noValueMethods\fP option is specified when using the \f2\-idl\fP option.
0N/A.TP 3
0N/A\-poa
4176N/AChanges the inheritance from \f2org.omg.CORBA_2_3.portable.ObjectImpl\fP to \f2org.omg.PortableServer.Servant\fP. The \f2PortableServer\fP module for the
0N/A.na
0N/A\f2Portable Object Adapter\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/idl/POA.html (POA) defines the native \f2Servant\fP type. In the Java programming language, the \f2Servant\fP type is mapped to the Java \f2org.omg.PortableServer.Servant\fP class. It serves as the base class for all POA servant implementations 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 Specification, CORBA V 2.3.1 ptc/00\-01\-08.pdf.
1178N/A.RE
0N/A.TP 3
0N/A\-J
0N/AUsed in conjunction with any \f2java\fP option, it passes the option following the \f2\-J\fP (no spaces between the \-J and the option) on to the \f2java\fP interpreter.
0N/A.TP 3
0N/A\-keep or \-keepgenerated
0N/ARetains the generated \f2.java\fP source files for the stub, skeleton, and/or tie classes and writes them to the same directory as the \f2.class\fP files.
0N/A.TP 3
0N/A\-nowarn
0N/ATurns off warnings. If used the compiler does not print out any warnings.
4176N/A.TP 3
4176N/A\-nowrite
4176N/ADoes not write compiled classes to the file system.
0N/A.TP 3
0N/A\-vcompat
0N/AGenerates stub and skeleton classes compatible with both the 1.1 and 1.2 JRMP stub protocol versions. (This option was the default in releases prior to 5.0.) The generated stub classes will use the 1.1 stub protocol version when loaded in a JDK 1.1 virtual machine and will use the 1.2 stub protocol version when loaded into a 1.2 (or later) virtual machine. The generated skeleton classes will support both 1.1 and 1.2 stub protocol versions. The generated classes are relatively large in order to support both modes of operation.
0N/A.TP 3
0N/A\-verbose
0N/ACauses the compiler and linker to print out messages about what classes are being compiled and what class files are being loaded.
0N/A.TP 3
0N/A\-v1.1
0N/AGenerates stub and skeleton classes for the 1.1 JRMP stub protocol version only. Note that this option is only useful for generating stub classes that are serialization\-compatible with pre\-existing, statically\-deployed stub classes that were generated by the \f3rmic\fP tool from JDK 1.1 and that cannot be upgraded (and dynamic class loading is not being used).
0N/A.TP 3
0N/A\-v1.2
0N/A(default) Generates stub classes for the 1.2 JRMP stub protocol version only. No skeleton classes are generated with this option because skeleton classes are not used with the 1.2 stub protocol version. The generated stub classes will not work if they are loaded into a JDK 1.1 virtual machine.
1178N/A.RE
1178N/A
0N/A.LP
0N/A.SH "ENVIRONMENT VARIABLES"
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/ACLASSPATH
0N/AUsed to provide the system a path to user\-defined classes. Directories are separated by colons. For example,
0N/A.nf
0N/A\f3
0N/A.fl
0N/A.:/usr/local/java/classes
0N/A.fl
0N/A\fP
0N/A.fi
0N/A.RE
0N/A
0N/A.LP
0N/A.SH "SEE ALSO"
0N/A.LP
0N/A.LP
1178N/Ajava(1), javac(1),
1178N/A.na
1178N/A\f2CLASSPATH\fP @
1178N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/tools/index.html#classpath
0N/A.LP
0N/A