1RMIC(1)                          JDK Commands                          RMIC(1)
2
3
4

NAME

6       rmic  -  generate  stub  and skeleton class files using the Java Remote
7       Method Protocol (JRMP)
8

SYNOPSIS

10       rmic [options] package-qualified-class-names
11
12       options
13              This represent the command-line options  for  thermic  compiler.
14              See Options for the rmic Compiler.
15
16       package-qualified-class-names
17              Class  names  that  include  their  packages,  for  example, ja‐
18              va.awt.Color.
19

DESCRIPTION

21       Deprecation Note: The rmic tool has been deprecated and is  subject  to
22       removal in a future release.  Support for static generation of Java Re‐
23       mote Method Protocol (JRMP) stubs and skeletons  has  been  deprecated.
24       Applications  should  use dynamically generated JRMP stubs, eliminating
25       the need to use the rmic tool for JRMP-based applications.
26
27       The rmic compiler generates stub and skeleton  class  files  using  the
28       JRMP.
29
30       Note:
31
32       The rmic compiler has been updated to remove the -idl and -iiop options
33       and can no longer generate IDL or IIOP stubs and tie classes.
34
35       JRMP class files are generated from compiled Java programming  language
36       classes that are remote object implementation classes.  A remote imple‐
37       mentation class is a class that implements the  interface  java.rmi.Re‐
38       mote.   The  class  names  in the rmic command must be for classes that
39       were compiled successfully with the javac command  and  must  be  fully
40       package  qualified.  For example, running the rmic command on the class
41       file name HelloImpl as shown here creates the HelloImpl_Stub.class file
42       in the hello subdirectory (named for the class's package):
43
44              rmic hello.HelloImpl
45
46       A  skeleton  for  a remote object is a JRMP protocol server-side entity
47       that has a method that dispatches calls to the remote object  implemen‐
48       tation.
49
50       A  stub  is  a client-side proxy for a remote object that's responsible
51       for communicating method invocations on remote objects  to  the  server
52       where the actual remote object implementation resides.  A client's ref‐
53       erence to a remote object, therefore, is actually a reference to a  lo‐
54       cal stub.
55
56       By  default,  the  rmic command generates stub classes that use the 1.2
57       JRMP stub protocol version only, as though the -v1.2 option were speci‐
58       fied.  See Options for the rmic Compiler.
59
60       A  stub implements only the remote interfaces, and not local interfaces
61       that the remote object also implements.  Because a JRMP stub implements
62       the  same  set  of remote interfaces as the remote object, a client can
63       use the Java programming language built-in operators  for  casting  and
64       type checking.
65
66       Note:
67
68       The  rmic  compiler  does  not support reading of class files that have
69       been compiled with the --enable-preview option,  nor  does  it  support
70       generation  of  stub or skeleton classes that have preview features en‐
71       abled.
72

OPTIONS FOR THE RMIC COMPILER

74       -bootclasspath path
75              Overrides the location of bootstrap class files.
76
77       -classpath path
78              Specifies the path the rmic command uses  to  look  up  classes.
79              This  option  overrides the default or the CLASSPATH environment
80              variable when it is set.  Directories are separated by colons or
81              semicolons,  depending  on your operating system.  The following
82              is the general format for path:
83
84              · Oracle Solaris, Linux, and OS  X:  .:your_path,  for  example:
85                .:/usr/local/java/classes
86
87              · Windows: .;your_path, for example: .;/usr/local/java/classes
88
89       -d directory
90              Specifies the root destination directory for the generated class
91              hierarchy.  You can use this option to specify a destination di‐
92              rectory for the stub, skeleton, and tie files.
93
94              · Oracle  Solaris,  Linux,  and OS X: For example, the following
95                command places the stub and skeleton classes derived from  My‐
96                Class into the directory /java/classes/exampleclass:
97
98                       rmic -d /java/classes exampleclass.MyClass
99
100              · Windows:  For  example,  the following command places the stub
101                and skeleton classes derived from MyClass into  the  directory
102                C:\java\classes\exampleclass:
103
104                       rmic -d C:\java\classes exampleclass.MyClass
105
106              If  the  -d option isn't specified, then the default behavior is
107              as though -d was specified.  The package hierarchy of the target
108              class is created in the current directory, and stub/tie/skeleton
109              files are placed within it.
110
111       -g     Enables the generation of all debugging  information,  including
112              local  variables.   By  default, only line number information is
113              generated.
114
115       -Jargument
116              Used with any Java command, the -J option  passes  the  argument
117              that  follows  it (no spaces between the -J and the argument) to
118              the Java interpreter.
119
120       -keep or -keepgenerated
121              Retains the generated .java source files for the stub, skeleton,
122              and  tie  classes  and  writes  them  to  the  same directory as
123              the.class files.
124
125       -nowarn
126              Turns off warnings.  When the -nowarn options is used, the  com‐
127              piler doesn't print warnings.
128
129       -nowrite
130              Doesn't write compiled classes to the file system.
131
132       -vcompat (deprecated)
133              Generates  stub  and  skeleton  classes that are compatible with
134              both the 1.1 and 1.2 JRMP stub protocol versions.   This  option
135              was  the  default  in  releases  before 5.0.  The generated stub
136              classes use the 1.1 stub protocol version when loaded in  a  JDK
137              1.1  virtual  machine and use the 1.2 stub protocol version when
138              loaded into a 1.2 (or later)  virtual  machine.   The  generated
139              skeleton  classes  support  both  1.1 and 1.2 stub protocol ver‐
140              sions.  The generated classes are relatively  large  to  support
141              both modes of operation.
142
143              Note:
144
145              This option has been deprecated.  See Description.
146
147       -verbose
148              Causes  the  compiler  and  linker  to print messages about what
149              classes are being compiled and what class files are being  load‐
150              ed.
151
152       -v1.1 (deprecated)
153              Generates stub and skeleton classes for the 1.1 JRMP stub proto‐
154              col version only.  The -v1.1 option is useful only for  generat‐
155              ing  stub  classes that are serialization-compatible with exist‐
156              ing, statically deployed stub classes generated by the rmic com‐
157              mand  from  JDK  1.1  that  can't be upgraded (and dynamic class
158              loading isn't being used).
159
160              Note:
161
162              This option has been deprecated.  See Description.
163
164       -v1.2 (deprecated)
165              (Default) Generates stub classes for the 1.2 JRMP stub  protocol
166              version  only.  No skeleton classes are generated because skele‐
167              ton classes aren't used with the 1.2 stub protocol version.  The
168              generated stub classes don't work when they're loaded into a JDK
169              1.1 virtual machine.
170
171              Note:
172
173              This option has been deprecated.  See Description.
174

ENVIRONMENT VARIABLES

176       CLASSPATH
177              Used to provide the system a path to user-defined classes.
178
179              · Oracle Solaris, Linux, and OS X: Directories are separated  by
180                colons, for example: .:/usr/local/java/classes.
181
182              · Windows:  Directories  are  separated  by colons, for example:
183                .;C:\usr\local\java\classes.
184
185
186
187JDK 14                               2020                              RMIC(1)
Impressum