1 .\" Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved. 2 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 .\" 4 .\" This code is free software; you can redistribute it and/or modify it 5 .\" under the terms of the GNU General Public License version 2 only, as 6 .\" published by the Free Software Foundation. 7 .\" 8 .\" This code is distributed in the hope that it will be useful, but WITHOUT 9 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 .\" version 2 for more details (a copy is included in the LICENSE file that 12 .\" accompanied this code). 13 .\" 14 .\" You should have received a copy of the GNU General Public License version 15 .\" 2 along with this work; if not, write to the Free Software Foundation, 16 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17 .\" 18 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 .\" or visit www.oracle.com if you need additional information or have any 20 .\" questions. 21 .\" 22 .\" Automatically generated by Pandoc 2.3.1 23 .\" 24 .TH "RMIC" "1" "2018" "JDK 13" "JDK Commands" 25 .hy 26 .SH NAME 27 .PP 28 rmic \- generate stub and skeleton class files using the Java Remote 29 Method Protocol (JRMP) 30 .SH SYNOPSIS 31 .PP 32 \f[CB]rmic\f[R] [\f[I]options\f[R]] 33 \f[I]package\-qualified\-class\-names\f[R] 34 .TP 35 .B \f[I]options\f[R] 36 This represent the command\-line \f[CB]options\f[R] for the\f[CB]rmic\f[R] 37 compiler. 38 See \f[B]Options for the rmic Compiler\f[R]. 39 .RS 40 .RE 41 .TP 42 .B \f[I]package\-qualified\-class\-names\f[R] 43 Class names that include their packages, for example, 44 \f[CB]java.awt.Color\f[R]. 45 .RS 46 .RE 47 .SH DESCRIPTION 48 .PP 49 \f[B]Deprecation Note:\f[R] The rmic tool has been deprecated and is 50 subject to removal in a future release. 51 Support for static generation of Java Remote Method Protocol (JRMP) 52 stubs and skeletons has been deprecated. 53 Applications should use dynamically generated JRMP stubs, eliminating 54 the need to use the rmic tool for JRMP\-based applications. 55 .PP 56 The \f[CB]rmic\f[R] compiler generates stub and skeleton class files using 57 the JRMP. 58 .PP 59 \f[B]Note:\f[R] 60 .PP 61 The rmic compiler has been updated to remove the \f[CB]\-idl\f[R] and 62 \f[CB]\-iiop\f[R] options and can no longer generate IDL or IIOP stubs and 63 tie classes. 64 .PP 65 JRMP class files are generated from compiled Java programming language 66 classes that are remote object implementation classes. 67 A remote implementation class is a class that implements the interface 68 \f[CB]java.rmi.Remote\f[R]. 69 The class names in the \f[CB]rmic\f[R] command must be for classes that 70 were compiled successfully with the \f[CB]javac\f[R] command and must be 71 fully package qualified. 72 For example, running the \f[CB]rmic\f[R] command on the class file name 73 \f[CB]HelloImpl\f[R] as shown here creates the 74 \f[CB]HelloImpl_Stub.class\f[R] file in the \f[CB]hello\f[R] subdirectory 75 (named for the class\[aq]s package): 76 .RS 77 .PP 78 \f[CB]rmic\ hello.HelloImpl\f[R] 79 .RE 80 .PP 81 A skeleton for a remote object is a JRMP protocol server\-side entity 82 that has a method that dispatches calls to the remote object 83 implementation. 84 .PP 85 A stub is a client\-side proxy for a remote object that\[aq]s 86 responsible for communicating method invocations on remote objects to 87 the server where the actual remote object implementation resides. 88 A client\[aq]s reference to a remote object, therefore, is actually a 89 reference to a local stub. 90 .PP 91 By default, the \f[CB]rmic\f[R] command generates stub classes that use 92 the 1.2 JRMP stub protocol version only, as though the \f[CB]\-v1.2\f[R] 93 option were specified. 94 See \f[B]Options for the rmic Compiler\f[R]. 95 .PP 96 A stub implements only the remote interfaces, and not local interfaces 97 that the remote object also implements. 98 Because a JRMP stub implements the same set of remote interfaces as the 99 remote object, a client can use the Java programming language built\-in 100 operators for casting and type checking. 101 .PP 102 \f[B]Note:\f[R] 103 .PP 104 The rmic compiler does not support reading of class files that have been 105 compiled with the \f[CB]\-\-enable\-preview\f[R] option, nor does it 106 support generation of stub or skeleton classes that have preview 107 features enabled. 108 .SH OPTIONS FOR THE RMIC COMPILER 109 .TP 110 .B \f[CB]\-bootclasspath\f[R] \f[I]path\f[R] 111 Overrides the location of bootstrap class files. 112 .RS 113 .RE 114 .TP 115 .B \f[CB]\-classpath\f[R] \f[I]path\f[R] 116 Specifies the path the \f[CB]rmic\f[R] command uses to look up classes. 117 This option overrides the default or the \f[CB]CLASSPATH\f[R] environment 118 variable when it is set. 119 Directories are separated by colons or semicolons, depending on your 120 operating system. 121 The following is the general format for \f[I]path\f[R]: 122 .RS 123 .IP \[bu] 2 124 \f[B]Oracle Solaris, Linux, and OS X:\f[R] 125 \f[CB]\&.:\f[R]\f[I]your_path\f[R], for example: 126 \f[CB]\&.:/usr/local/java/classes\f[R] 127 .IP \[bu] 2 128 \f[B]Windows:\f[R] \f[CB]\&.;\f[R]\f[I]your_path\f[R], for example: 129 \f[CB]\&.;/usr/local/java/classes\f[R] 130 .RE 131 .TP 132 .B \f[CB]\-d\f[R] \f[I]directory\f[R] 133 Specifies the root destination directory for the generated class 134 hierarchy. 135 You can use this option to specify a destination directory for the stub, 136 skeleton, and tie files. 137 .RS 138 .IP \[bu] 2 139 \f[B]Oracle Solaris, Linux, and OS X:\f[R] For example, the following 140 command places the stub and skeleton classes derived from 141 \f[CB]MyClass\f[R] into the directory \f[CB]/java/classes/exampleclass\f[R]: 142 .RS 2 143 .RS 144 .PP 145 \f[CB]rmic\ \-d\ /java/classes\ exampleclass.MyClass\f[R] 146 .RE 147 .RE 148 .IP \[bu] 2 149 \f[B]Windows:\f[R] For example, the following command places the stub and 150 skeleton classes derived from \f[CB]MyClass\f[R] into the directory 151 \f[CB]C:\\java\\classes\\exampleclass\f[R]: 152 .RS 2 153 .RS 154 .PP 155 \f[CB]rmic\ \-d\ C:\\java\\classes\ exampleclass.MyClass\f[R] 156 .RE 157 .RE 158 .PP 159 If the \f[CB]\-d\f[R] option isn\[aq]t specified, then the default 160 behavior is as though \f[CB]\-d\f[R] was specified. 161 The package hierarchy of the target class is created in the current 162 directory, and stub/tie/skeleton files are placed within it. 163 .RE 164 .TP 165 .B \f[CB]\-g\f[R] 166 Enables the generation of all debugging information, including local 167 variables. 168 By default, only line number information is generated. 169 .RS 170 .RE 171 .TP 172 .B \f[CB]\-J\f[R]\f[I]argument\f[R] 173 Used with any Java command, the \f[CB]\-J\f[R] option passes the 174 \f[I]argument\f[R] that follows it (no spaces between the \f[CB]\-J\f[R] 175 and the argument) to the Java interpreter. 176 .RS 177 .RE 178 .TP 179 .B \f[CB]\-keep\f[R] or \f[CB]\-keepgenerated\f[R] 180 Retains the generated \f[CB]\&.java\f[R] source files for the stub, 181 skeleton, and tie classes and writes them to the same directory as 182 the\f[CB]\&.class\f[R] files. 183 .RS 184 .RE 185 .TP 186 .B \f[CB]\-nowarn\f[R] 187 Turns off warnings. 188 When the \f[CB]\-nowarn\f[R] options is used, the compiler doesn\[aq]t 189 print warnings. 190 .RS 191 .RE 192 .TP 193 .B \f[CB]\-nowrite\f[R] 194 Doesn\[aq]t write compiled classes to the file system. 195 .RS 196 .RE 197 .TP 198 .B \f[CB]\-vcompat\f[R] (deprecated) 199 Generates stub and skeleton classes that are compatible with both the 200 1.1 and 1.2 JRMP stub protocol versions. 201 This option was the default in releases before 5.0. 202 The generated stub classes use the 1.1 stub protocol version when loaded 203 in a JDK 1.1 virtual machine and use the 1.2 stub protocol version when 204 loaded into a 1.2 (or later) virtual machine. 205 The generated skeleton classes support both 1.1 and 1.2 stub protocol 206 versions. 207 The generated classes are relatively large to support both modes of 208 operation. 209 .RS 210 .PP 211 \f[B]Note:\f[R] 212 .PP 213 This option has been deprecated. 214 See \f[B]Description\f[R]. 215 .RE 216 .TP 217 .B \f[CB]\-verbose\f[R] 218 Causes the compiler and linker to print messages about what classes are 219 being compiled and what class files are being loaded. 220 .RS 221 .RE 222 .TP 223 .B \f[CB]\-v1.1\f[R] (deprecated) 224 Generates stub and skeleton classes for the 1.1 JRMP stub protocol 225 version only. 226 The \f[CB]\-v1.1\f[R] option is useful only for generating stub classes 227 that are serialization\-compatible with existing, statically deployed 228 stub classes generated by the \f[CB]rmic\f[R] command from JDK 1.1 that 229 can\[aq]t be upgraded (and dynamic class loading isn\[aq]t being used). 230 .RS 231 .PP 232 \f[B]Note:\f[R] 233 .PP 234 This option has been deprecated. 235 See \f[B]Description\f[R]. 236 .RE 237 .TP 238 .B \f[CB]\-v1.2\f[R] (deprecated) 239 (Default) Generates stub classes for the 1.2 JRMP stub protocol version 240 only. 241 No skeleton classes are generated because skeleton classes aren\[aq]t 242 used with the 1.2 stub protocol version. 243 The generated stub classes don\[aq]t work when they\[aq]re loaded into a 244 JDK 1.1 virtual machine. 245 .RS 246 .PP 247 \f[B]Note:\f[R] 248 .PP 249 This option has been deprecated. 250 See \f[B]Description\f[R]. 251 .RE 252 .SH ENVIRONMENT VARIABLES 253 .TP 254 .B \f[CB]CLASSPATH\f[R] 255 Used to provide the system a path to user\-defined classes. 256 .RS 257 .IP \[bu] 2 258 \f[B]Oracle Solaris, Linux, and OS X:\f[R] Directories are separated by 259 colons, for example: \f[CB]\&.:/usr/local/java/classes\f[R]. 260 .IP \[bu] 2 261 \f[B]Windows:\f[R] Directories are separated by colons, for example: 262 \f[CB]\&.;C:\\usr\\local\\java\\classes\f[R]. 263 .RE