You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

rmic.html 7.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Rmic Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="rmic">Rmic</a></h2>
  8. <h3>Description</h3>
  9. <p>Runs the rmic compiler for a certain class.</p>
  10. <p>Rmic can be run on a single class (as specified with the classname
  11. attribute) or a number of classes at once (all classes below base that
  12. are neither _Stub nor _Skel classes). If you want to rmic a single
  13. class and this class is a class nested into another class, you have to
  14. specify the classname in the form <code>Outer$$Inner</code> instead of
  15. <code>Outer.Inner</code>.</p>
  16. <p>It is possible to refine the set of files that are being rmiced. This can be
  17. done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and <i>defaultexcludes</i>
  18. attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to
  19. have included by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify
  20. the files you want to have excluded. This is also done with patterns. And
  21. finally with the <i>defaultexcludes</i> attribute, you can specify whether you
  22. want to use default exclusions or not. See the section on <a
  23. href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
  24. inclusion/exclusion of files works, and how to write patterns.</p>
  25. <p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
  26. supports all attributes of <code>&lt;fileset&gt;</code>
  27. (<code>dir</code> becomes <code>base</code>) as well as the nested
  28. <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
  29. <code>&lt;patternset&gt;</code> elements.</p>
  30. <p>It is possible to use different compilers. This can be selected with the
  31. &quot;build.rmic&quot; property. There are three choices:</p>
  32. <ul>
  33. <li>sun (the standard compiler of the JDK)</li>
  34. <li>kaffe (the standard compiler of <a href="http://www.kaffe.org" target="_top">Kaffe</a>)</li>
  35. <li>weblogic</li>
  36. </ul>
  37. <h3>Parameters</h3>
  38. <table border="1" cellpadding="2" cellspacing="0">
  39. <tr>
  40. <td valign="top"><b>Attribute</b></td>
  41. <td valign="top"><b>Description</b></td>
  42. <td align="center" valign="top"><b>Required</b></td>
  43. </tr>
  44. <tr>
  45. <td valign="top">base</td>
  46. <td valign="top">the location to store the compiled files.</td>
  47. <td valign="top" align="center">Yes</td>
  48. </tr>
  49. <tr>
  50. <td valign="top">classname</td>
  51. <td valign="top">the class for which to run <code>rmic</code>.</td>
  52. <td valign="top" align="center">No</td>
  53. </tr>
  54. <tr>
  55. <td valign="top">filtering</td>
  56. <td valign="top">indicates whether token filtering should take place</td>
  57. <td valign="top" align="center">No</td>
  58. </tr>
  59. <tr>
  60. <td valign="top">sourcebase</td>
  61. <td valign="top">Pass the &quot;-keepgenerated&quot; flag to rmic and
  62. move the generated source file to the base directory.</td>
  63. <td align="center" valign="top">No</td>
  64. </tr>
  65. <tr>
  66. <td valign="top">stubversion</td>
  67. <td valign="top">Specify the JDK version for the generated stub code.
  68. Specify &quot;1.1&quot; to pass the &quot;-v1.1&quot; option to rmic.</td>
  69. <td align="center" valign="top">No</td>
  70. </tr>
  71. <tr>
  72. <td valign="top">classpath</td>
  73. <td valign="top">The classpath to use during compilation</td>
  74. <td align="center" valign="top">No</td>
  75. </tr>
  76. <tr>
  77. <td valign="top">classpathref</td>
  78. <td valign="top">The classpath to use during compilation, given as <a
  79. href="../using.html#references">reference</a> to a PATH defined elsewhere</td>
  80. <td align="center" valign="top">No</td>
  81. </tr>
  82. <tr>
  83. <td valign="top">includes</td>
  84. <td valign="top">comma separated list of patterns of files that must be
  85. included. All files are included when omitted.</td>
  86. <td valign="top" align="center">No</td>
  87. </tr>
  88. <tr>
  89. <td valign="top">includesfile</td>
  90. <td valign="top">the name of a file. Each line of this file is
  91. taken to be an include pattern</td>
  92. <td valign="top" align="center">No</td>
  93. </tr>
  94. <tr>
  95. <td valign="top">excludes</td>
  96. <td valign="top">comma separated list of patterns of files that must be
  97. excluded. No files (except default excludes) are excluded when omitted.</td>
  98. <td valign="top" align="center">No</td>
  99. </tr>
  100. <tr>
  101. <td valign="top">excludesfile</td>
  102. <td valign="top">the name of a file. Each line of this file is
  103. taken to be an exclude pattern</td>
  104. <td valign="top" align="center">No</td>
  105. </tr>
  106. <tr>
  107. <td valign="top">defaultexcludes</td>
  108. <td valign="top">indicates whether default excludes should be used or not
  109. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  110. <td valign="top" align="center">No</td>
  111. </tr>
  112. <tr>
  113. <td valign="top">verify</td>
  114. <td valign="top">check that classes implement Remote before handing them
  115. to rmic (default is false)</td>
  116. <td align="center" valign="top">No</td>
  117. </tr>
  118. <tr>
  119. <td valign="top">iiop</td>
  120. <td valign="top">indicates that portable (RMI/IIOP) stubs should be generated</td>
  121. <td align="center" valign="top">No</td>
  122. </tr>
  123. <tr>
  124. <td valign="top">iiopopts</td>
  125. <td valign="top">additional arguments for IIOP class generation</td>
  126. <td align="center" valign="top">No</td>
  127. </tr>
  128. <tr>
  129. <td valign="top">idl</td>
  130. <td valign="top">indicates that IDL output files should be generated</td>
  131. <td align="center" valign="top">No</td>
  132. </tr>
  133. <tr>
  134. <td valign="top">idlopts</td>
  135. <td valign="top">additional arguments for IDL file generation</td>
  136. <td align="center" valign="top">No</td>
  137. </tr>
  138. <tr>
  139. <td valign="top">debug</td>
  140. <td valign="top">generate debug info (passes -g to rmic). Defaults to false.</td>
  141. <td align="center" valign="top">No</td>
  142. </tr>
  143. <tr>
  144. <td valign="top">includeAntRuntime</td>
  145. <td valign="top">whether to include the Ant run-time libraries;
  146. defaults to <code>yes</code>.</td>
  147. <td align="center" valign="top">No</td>
  148. </tr>
  149. <tr>
  150. <td valign="top">includeJavaRuntime</td>
  151. <td valign="top">whether to include the default run-time
  152. libraries from the executing VM; defaults to <code>no</code>.</td>
  153. <td align="center" valign="top">No</td>
  154. </tr>
  155. <tr>
  156. <td valign="top">extdirs</td>
  157. <td valign="top">location of installed extensions.</td>
  158. <td align="center" valign="top">No</td>
  159. </tr>
  160. </table>
  161. <h3>Parameters specified as nested elements</h3>
  162. <h4>classpath and extdirs</h4>
  163. <p><code>Rmic</code>'s <i>classpath</i> and <i>extdirs</i> attributes are <a
  164. href="../using.html#path">PATH like structure</a> and can also be set via a nested
  165. <i>classpath</i> and <i>extdirs</i> elements.</p>
  166. <h3>Examples</h3>
  167. <pre> &lt;rmic classname=&quot;com.xyz.FooBar&quot; base=&quot;${build}/classes&quot;/&gt;</pre>
  168. <p>runs the rmic compiler for the class <code>com.xyz.FooBar</code>. The
  169. compiled files will be stored in the directory <code>${build}/classes</code>.</p>
  170. <pre> &lt;rmic base=&quot;${build}/classes&quot; includes=&quot;**/Remote*.class&quot;/&gt;</pre>
  171. <p>runs the rmic compiler for all classes with <code>.class</code>
  172. files below <code>${build}/classes</code> whose classname starts with
  173. <i>Remote</i>. The compiled files will be stored in the directory
  174. <code>${build}/classes</code>.</p>
  175. <hr>
  176. <p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
  177. Reserved.</p>
  178. </body>
  179. </html>