jdt-core-home/howto/batch compile/batchCompile.html
Parent Directory
|
Revision Log
Revision 1.7 - (view) (download) (as text)
| 1 : | pmulet | 1.1 | <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
| 2 : | <html> | ||
| 3 : | <head> | ||
| 4 : | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | ||
| 5 : | <meta name="GENERATOR" content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]"> | ||
| 6 : | <title>How to: Run batch compiler</title> | ||
| 7 : | <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" type="text/css"> | ||
| 8 : | </head> | ||
| 9 : | <body text="#000000" bgcolor="#FFFFFF"> | ||
| 10 : | | ||
| 11 : | <table BORDER=0 CELLSPACING=5 CELLPADDING=2 WIDTH="100%" > | ||
| 12 : | <tr> | ||
| 13 : | <td ALIGN=LEFT VALIGN=TOP COLSPAN="2" BGCOLOR="#0080C0"><b><font color="#FFFFFF">JDT | ||
| 14 : | Core / HowTo: Run the Batch Compiler </font></b></td> | ||
| 15 : | </tr> | ||
| 16 : | |||
| 17 : | <tr> | ||
| 18 : | <td ALIGN=RIGHT VALIGN=TOP WIDTH="2%"><img SRC="http://dev.eclipse.org/images/Adarrow.gif" NOSAVE BORDER=0 height=16 width=16></td> | ||
| 19 : | |||
| 20 : | <td WIDTH="98%"><b>Finding the batch compiler</b> | ||
| 21 : | <br>The batch compiler class is located in the internal classes of the | ||
| 22 : | JDT/Core plugin. So it is in the <i>jdtcore.jar</i> file in the directory | ||
| 23 : | <i>plugins/org.eclipse.jdt.core</i>. | ||
| 24 : | The name of the class is <i>org.eclipse.jdt.internal.compiler.batch.Main</i>. </td> | ||
| 25 : | </tr> | ||
| 26 : | |||
| 27 : | <tr> | ||
| 28 : | <td ALIGN=RIGHT VALIGN=TOP WIDTH="2%"><img SRC="http://dev.eclipse.org/images/Adarrow.gif" NOSAVE BORDER=0 height=16 width=16></td> | ||
| 29 : | |||
| 30 : | <td WIDTH="98%"><b>Running the batch compiler</b> | ||
| 31 : | <ul> | ||
| 32 : | <li> | ||
| 33 : | Using the main method.</li> | ||
| 34 : | |||
| 35 : | <blockquote>Using the main method. The Main class has a main method. This | ||
| 36 : | is the classical way to invoke the batch compiler on a command-line. | ||
| 37 : | <ul> | ||
| 38 : | <li> | ||
| 39 : | oliviert | 1.7 | For example on a command-line: |
| 40 : | pmulet | 1.1 | <br><font color="#3366FF">java -classpath jdtcore.jar org.eclipse.jdt.internal.compiler.batch.Main |
| 41 : | oliviert | 1.7 | -classpath rt.jar A.java</font><br> |
| 42 : | or:<br> | ||
| 43 : | <font color="#3366FF">java -jar jdtcore.jar org.eclipse.jdt.internal.compiler.batch.Main | ||
| 44 : | pmulet | 1.1 | -classpath rt.jar A.java</font> |
| 45 : | oliviert | 1.7 | </li> |
| 46 : | pmulet | 1.1 | <li> |
| 47 : | For example in a java source:</li> | ||
| 48 : | |||
| 49 : | <br><font color="#3366FF">org.eclipse.jdt.internal.compiler.batch.Main.main(new | ||
| 50 : | String[] {"-classpath", "rt.jar", "A.java"});</font></ul> | ||
| 51 : | </blockquote> | ||
| 52 : | |||
| 53 : | <li> | ||
| 54 : | Using the static compile(String) method.</li> | ||
| 55 : | |||
| 56 : | <blockquote>The compile(String) method is a convenient method to invoke | ||
| 57 : | the batch compiler in a java application. | ||
| 58 : | <br>Instead of: | ||
| 59 : | <ul> | ||
| 60 : | <li> | ||
| 61 : | <font color="#3366FF">org.eclipse.jdt.internal.compiler.batch.Main.main(new | ||
| 62 : | String[] {"-classpath", "rt.jar", "A.java"});</font></li> | ||
| 63 : | |||
| 64 : | <li> | ||
| 65 : | you can simply write: <font color="#3366FF">org.eclipse.jdt.internal.compiler.batch.Main.compile("-classpath | ||
| 66 : | rt.jar A.java");</font></li> | ||
| 67 : | </ul> | ||
| 68 : | </blockquote> | ||
| 69 : | </ul> | ||
| 70 : | </td> | ||
| 71 : | </tr> | ||
| 72 : | |||
| 73 : | <tr> | ||
| 74 : | <td ALIGN=RIGHT VALIGN=TOP WIDTH="2%"><img SRC="http://dev.eclipse.org/images/Adarrow.gif" NOSAVE BORDER=0 height=16 width=16></td> | ||
| 75 : | |||
| 76 : | <td WIDTH="98%"><b>Which options are available?</b> | ||
| 77 : | <p> | ||
| 78 : | With the orange background, these are suggested options. | ||
| 79 : | </p> | ||
| 80 : | <blockquote> | ||
| 81 : | <table BORDER CELLSPACING=2 CELLPADDING=2 COLS=2 WIDTH="100%" > | ||
| 82 : | <tr> | ||
| 83 : | <th>Name</th> | ||
| 84 : | <th>Usage</th> | ||
| 85 : | </tr> | ||
| 86 : | <tr> | ||
| 87 : | oliviert | 1.4 | <th colspan="2">Classpath options</th> |
| 88 : | pmulet | 1.1 | </tr> |
| 89 : | <tr> | ||
| 90 : | oliviert | 1.2 | <td valign=top bgcolor="#FFCCAA">-bootclasspath <dir 1>;<dir 2>;...;<dir P></td> |
| 91 : | <td valign=top bgcolor="#FFCCAA">This is a list of directory or jar files used to bootstrap the class files used by the compiler. By default the libraries of the running | ||
| 92 : | oliviert | 1.4 | VM are used. Entries are separated by the platform path separator.</td> |
| 93 : | oliviert | 1.2 | </tr> |
| 94 : | <tr> | ||
| 95 : | oliviert | 1.4 | <td valign=top bgcolor="#FFCCAA">-cp -classpath <dir 1>;<dir 2>;...;<dir P></td> |
| 96 : | oliviert | 1.2 | <td valign=top bgcolor="#FFCCAA">This is a list of directory or jar files used to compile the source files. The default value is the value of the property "java.class.path". |
| 97 : | oliviert | 1.4 | Entries are separated by the platform path separator. |
| 98 : | oliviert | 1.2 | </td> |
| 99 : | pmulet | 1.1 | </tr> |
| 100 : | <tr> | ||
| 101 : | oliviert | 1.7 | <td valign=top>-extdirs <dir 1>;<dir 2>;...;<dir P></td> |
| 102 : | <td valign=top>This is a list of directory used to specify the location of extension zip/jar files. Entries are separated by the platform path separator.</td> | ||
| 103 : | </tr> | ||
| 104 : | <tr> | ||
| 105 : | <td valign=top>-sourcepath <dir 1>;<dir 2>;...;<dir P></td> | ||
| 106 : | <td valign=top>This is a list of directory used to specify the source files. Entries are separated by the platform path separator.</td> | ||
| 107 : | </tr> | ||
| 108 : | <tr> | ||
| 109 : | pmulet | 1.1 | <td valign=top bgcolor="#FFCCAA">-d <dir 1>|none</td> |
| 110 : | <td bgcolor="#FFCCAA">This is used to specify in which directory the generated .class files should be dumped. If it is omitted, no package directory structure is created.<br> | ||
| 111 : | If you don't want to generate .class files, use <font color="#3366FF">-d none</font>.</td> | ||
| 112 : | </tr> | ||
| 113 : | <tr> | ||
| 114 : | oliviert | 1.4 | <td valign=top>-encoding <encoding name></td> |
| 115 : | <td>Specify default source encoding format (custom encoding can also be specifed on a per file basis by suffixing each input source file/folder name with <font color="#3366FF">[encoding <encoding name>]</font>).</td> | ||
| 116 : | </tr> | ||
| 117 : | <tr> | ||
| 118 : | <th colspan="2">Compliance options</th> | ||
| 119 : | </tr> | ||
| 120 : | <tr> | ||
| 121 : | oliviert | 1.7 | <td valign=top>-target 1.1|1.2|1.3|1.4|1.5|5|5.0</td> |
| 122 : | <td>This specifies the classfile target setting. | ||
| 123 : | The possible value are: | ||
| 124 : | <ul> | ||
| 125 : | <li><font color="#3366FF">1.1</font> (major version: 45 minor: 3)</li> | ||
| 126 : | <li><font color="#3366FF">1.2</font> (major version: 46 minor: 0)</li> | ||
| 127 : | <li><font color="#3366FF">1.3</font> (major version: 47 minor: 0)</li> | ||
| 128 : | <li><font color="#3366FF">1.4</font> (major version: 48 minor: 0)</li> | ||
| 129 : | <li><font color="#3366FF">1.5</font>, <font color="#3366FF">5</font> or <font color="#3366FF">5.0</font> (major version: 49 minor: 0)</li> | ||
| 130 : | </ul> | ||
| 131 : | Defaults are: | ||
| 132 : | <ul> | ||
| 133 : | <li><font color="#3366FF">1.1</font> in <font color="#3366FF">-1.3</font> mode</li> | ||
| 134 : | <li><font color="#3366FF">1.2</font> in <font color="#3366FF">-1.4</font> mode</li> | ||
| 135 : | <li><font color="#3366FF">1.5</font> in <font color="#3366FF">-1.5</font> mode</li> | ||
| 136 : | </ul> | ||
| 137 : | </td> | ||
| 138 : | pmulet | 1.1 | </tr> |
| 139 : | <tr> | ||
| 140 : | <td valign=top>-1.3</td> | ||
| 141 : | oliviert | 1.4 | <td>Set compliance level to <font color="#3366FF">1.3</font>. Implicit -source 1.3 -target 1.1.</td> |
| 142 : | pmulet | 1.1 | </tr> |
| 143 : | <tr> | ||
| 144 : | <td valign=top>-1.4</td> | ||
| 145 : | oliviert | 1.4 | <td>Set compliance level to <font color="#3366FF">1.4</font> (default). Implicit -source 1.3 -target 1.2.</td> |
| 146 : | </tr> | ||
| 147 : | <tr> | ||
| 148 : | <td valign=top>-1.5</td> | ||
| 149 : | <td>Set compliance level to <font color="#3366FF">1.5</font>. Implicit -source 1.5 -target 1.5.</td> | ||
| 150 : | pmulet | 1.1 | </tr> |
| 151 : | <tr> | ||
| 152 : | oliviert | 1.7 | <td valign=top>-source 1.3|1.4|1.5|5|5.0</td> |
| 153 : | <td>This is used to enable the source level of the compiler.<br> | ||
| 154 : | The possible value are: | ||
| 155 : | <ul> | ||
| 156 : | <li><font color="#3366FF">1.3</font></li> | ||
| 157 : | <li><font color="#3366FF">1.4</font></li> | ||
| 158 : | <li><font color="#3366FF">1.5</font>, <font color="#3366FF">5</font> or <font color="#3366FF">5.0</font></li> | ||
| 159 : | </ul> | ||
| 160 : | Defaults are: | ||
| 161 : | <ul> | ||
| 162 : | <li><font color="#3366FF">1.3</font> in <font color="#3366FF">-1.3</font> mode</li> | ||
| 163 : | <li><font color="#3366FF">1.4</font> in <font color="#3366FF">-1.4</font> mode</li> | ||
| 164 : | <li><font color="#3366FF">1.5</font> in <font color="#3366FF">-1.5</font> mode</li> | ||
| 165 : | </ul> | ||
| 166 : | In <font color="#3366FF">1.4</font>, <font color="#3366FF"><I>assert</I></font> is treated as a keyword. In <font color="#3366FF">1.5</font>, <font color="#3366FF"><I>enum</I></font> and <font color="#3366FF"><i>assert</i></font> are treated as a keyword.</td> | ||
| 167 : | pmulet | 1.1 | </tr> |
| 168 : | <tr> | ||
| 169 : | oliviert | 1.4 | <th colspan="2">Warning options</th> |
| 170 : | </tr> | ||
| 171 : | <tr> | ||
| 172 : | oliviert | 1.7 | <td valign=top>-warn:<blockquote>allDeprecation<br>allJavadoc<br><font color="#FF0000">assertIdentifier</font><br>boxing<br><font color="#FF0000">charConcat</font><br>conditionAssign<br><font color="#FF0000">constructorName</font> |
| 173 : | <br>dep-ann<br><font color="#FF0000">deprecation</font><br>emptyBlock<br>enumSwitch<br>fieldHiding<br>finalBound<br><font color="#FF0000">finally</font><br>hiding<br>incomplete-switch<br>indirectStatic | ||
| 174 : | <br><font color="#FF0000">intfAnnotation</font><br><font color="#FF0000">intfNonInherited</font><br>javadoc<br>localHiding | ||
| 175 : | <br><font color="#FF0000">maskedCatchBlocks</font><br>nls<br><font color="#FF0000">noEffectAssign</font><br>null<br>over-ann<br><font color="#FF0000">pkgDefaultMethod</font><br>semicolon<br><font color="#FF0000">serial</font><br> | ||
| 176 : | specialParamHiding<br>static-access<br><font color="#FF0000">staticReceiver</font><br><font color="#FF0000">suppress</font><br>synthetic-access<br>syntheticAccess<br>tasks(<task1>|...|<taskN>)<br> | ||
| 177 : | <font color="#FF0000">typeHiding</font><br><font color="#FF0000">unchecked</font><br>unnecessaryElse<br>unqualified-field-access<br>unqualifiedField<br>uselessTypeCheck | ||
| 178 : | <br>unused<br>unusedArgument<br><font color="#FF0000">unusedImport</font><br><font color="#FF0000">unusedLocal</font><br><font color="#FF0000">unusedPrivate</font><br>unusedThrown | ||
| 179 : | <br><font color="#FF0000">varargsCast</font><br><font color="#FF0000">warningToken</font> | ||
| 180 : | </blockquote> | ||
| 181 : | pmulet | 1.1 | </td> |
| 182 : | oliviert | 1.3 | <td valign=top>Set warning level.<br>e.g. <font color="#3366FF">-warn:unusedLocals,deprecation</font><br> |
| 183 : | oliviert | 1.5 | <p>In <font color="#FF0000">red</font> are the default settings.</p> |
| 184 : | oliviert | 1.4 | <p> |
| 185 : | <pre> | ||
| 186 : | oliviert | 1.6 | -warn:<warnings separated by ,> enable exactly the listed warnings |
| 187 : | -warn:+<warnings separated by ,> enable additional warnings | ||
| 188 : | -warn:-<warnings separated by ,> disable specific warnings | ||
| 189 : | oliviert | 1.4 | </pre> |
| 190 : | pmulet | 1.1 | <table> |
| 191 : | <tr> | ||
| 192 : | oliviert | 1.4 | <th align=left valign=top>allDeprecation</th> |
| 193 : | <td valign=top>deprecation even inside deprecated code</td> | ||
| 194 : | </tr> | ||
| 195 : | <tr> | ||
| 196 : | <th align=left valign=top>allJavadoc</th> | ||
| 197 : | <td valign=top>invalid or missing javadoc</td> | ||
| 198 : | </tr> | ||
| 199 : | <tr> | ||
| 200 : | <th align=left valign=top>assertIdentifier</th> | ||
| 201 : | <td valign=top>occurrence of <i>assert</i> used as identifier</td> | ||
| 202 : | </tr> | ||
| 203 : | <tr> | ||
| 204 : | oliviert | 1.7 | <tr> |
| 205 : | <th align=left valign=top>boxing</th> | ||
| 206 : | <td valign=top>autoboxing conversion</td> | ||
| 207 : | </tr> | ||
| 208 : | <tr> | ||
| 209 : | oliviert | 1.4 | <th align=left valign=top>charConcat</th> |
| 210 : | <td valign=top>when a char array is used in a string concatenation without being converted explicitely to | ||
| 211 : | a string</td> | ||
| 212 : | </tr> | ||
| 213 : | <tr> | ||
| 214 : | <th align=left valign=top>conditionAssign</th> | ||
| 215 : | <td valign=top>possible accidental boolean assignment</td> | ||
| 216 : | </tr> | ||
| 217 : | <tr> | ||
| 218 : | oliviert | 1.3 | <th align=left valign=top>constructorName</th> |
| 219 : | oliviert | 1.4 | <td valign=top>method with constructor name</td> |
| 220 : | pmulet | 1.1 | </tr> |
| 221 : | <tr> | ||
| 222 : | oliviert | 1.7 | <th align=left valign=top>dep-ann</th> |
| 223 : | <td valign=top>missing @Deprecated annotation</td> | ||
| 224 : | </tr> | ||
| 225 : | <tr> | ||
| 226 : | oliviert | 1.4 | <th align=left valign=top>deprecation</th> |
| 227 : | <td valign=top>usage of deprecated type or member outside deprecated code</td> | ||
| 228 : | pmulet | 1.1 | </tr> |
| 229 : | <tr> | ||
| 230 : | oliviert | 1.4 | <th align=left valign=top>emptyBlock</th> |
| 231 : | <td valign=top>undocumented empty block</td> | ||
| 232 : | pmulet | 1.1 | </tr> |
| 233 : | <tr> | ||
| 234 : | oliviert | 1.7 | <th align=left valign=top>enumSwitch,<br>incomplete-switch</th> |
| 235 : | <td valign=top>incomplete enum switch</td> | ||
| 236 : | </tr> | ||
| 237 : | <tr> | ||
| 238 : | oliviert | 1.4 | <th align=left valign=top>fieldHiding</th> |
| 239 : | <td valign=top>field hiding another variable</td> | ||
| 240 : | pmulet | 1.1 | </tr> |
| 241 : | <tr> | ||
| 242 : | oliviert | 1.4 | <th align=left valign=top>finalBound</th> |
| 243 : | <td valign=top>type parameter with final bound</td> | ||
| 244 : | pmulet | 1.1 | </tr> |
| 245 : | <tr> | ||
| 246 : | oliviert | 1.4 | <th align=left valign=top>finally</th> |
| 247 : | <td valign=top>finally block not completing normally</td> | ||
| 248 : | pmulet | 1.1 | </tr> |
| 249 : | <tr> | ||
| 250 : | oliviert | 1.7 | <th align=left valign=top>hiding</th> |
| 251 : | <td valign=top>macro for fieldHiding, localHiding, typeHiding and maskedCatchBlock</td> | ||
| 252 : | </tr> | ||
| 253 : | <tr> | ||
| 254 : | <th align=left valign=top>indirectStatic</th> | ||
| 255 : | <td valign=top>indirect reference to static member</td> | ||
| 256 : | </tr> | ||
| 257 : | <tr> | ||
| 258 : | <th align=left valign=top>intfAnnotation</th> | ||
| 259 : | <td valign=top>annotation type used as super interface</td> | ||
| 260 : | </tr> | ||
| 261 : | <tr> | ||
| 262 : | oliviert | 1.4 | <th align=left valign=top>intfNonInherited</th> |
| 263 : | <td valign=top>interface non-inherited method compatibility</td> | ||
| 264 : | pmulet | 1.1 | </tr> |
| 265 : | <tr> | ||
| 266 : | oliviert | 1.4 | <th align=left valign=top>javadoc</th> |
| 267 : | <td valign=top>invalid javadoc</td> | ||
| 268 : | pmulet | 1.1 | </tr> |
| 269 : | <tr> | ||
| 270 : | oliviert | 1.4 | <th align=left valign=top>localHiding</th> |
| 271 : | <td valign=top>local variable hiding another variable</td> | ||
| 272 : | oliviert | 1.3 | </tr> |
| 273 : | <tr> | ||
| 274 : | oliviert | 1.4 | <th align=left valign=top>maskedCatchBlocks</th> |
| 275 : | <td valign=top>hidden catch block</td> | ||
| 276 : | oliviert | 1.3 | </tr> |
| 277 : | <tr> | ||
| 278 : | <th align=left valign=top>nls</th> | ||
| 279 : | oliviert | 1.4 | <td>non-nls string literals (lacking of tags //$NON-NLS-<n>)</td> |
| 280 : | </tr> | ||
| 281 : | <tr> | ||
| 282 : | <th align=left valign=top>noEffectAssign</th> | ||
| 283 : | <td valign=top>for assignment with no effect</td> | ||
| 284 : | oliviert | 1.3 | </tr> |
| 285 : | <tr> | ||
| 286 : | oliviert | 1.7 | <th align=left valign=top>null</th> |
| 287 : | <td>missing or redundant null check</td> | ||
| 288 : | </tr> | ||
| 289 : | <tr> | ||
| 290 : | <th align=left valign=top>over-ann</th> | ||
| 291 : | <td>missing @Override annotation</td> | ||
| 292 : | </tr> | ||
| 293 : | <tr> | ||
| 294 : | oliviert | 1.4 | <th align=left valign=top>pkgDefaultMethod</th> |
| 295 : | <td valign=top>attempt to override package-default method</td> | ||
| 296 : | oliviert | 1.5 | </tr> |
| 297 : | <tr> | ||
| 298 : | <th align=left valign=top>serial</th> | ||
| 299 : | <td valign=top>missing serialVersionUID</td> | ||
| 300 : | oliviert | 1.4 | </tr> |
| 301 : | <tr> | ||
| 302 : | <th align=left valign=top>semicolon</th> | ||
| 303 : | <td valign=top>unnecessary semicolon or empty statement</td> | ||
| 304 : | </tr> | ||
| 305 : | <tr> | ||
| 306 : | <th align=left valign=top>specialParamHiding</th> | ||
| 307 : | <td valign=top>constructor or setter parameter hiding another field</td> | ||
| 308 : | oliviert | 1.3 | </tr> |
| 309 : | <tr> | ||
| 310 : | oliviert | 1.7 | <th align=left valign=top>static-access</th> |
| 311 : | <td valign=top>macro for indirectStatic and staticReceiver</td> | ||
| 312 : | </tr> | ||
| 313 : | <tr> | ||
| 314 : | oliviert | 1.4 | <th align=left valign=top>staticReceiver</th> |
| 315 : | <td valign=top>if a non static receiver is used to get a static field or call a static method</td> | ||
| 316 : | oliviert | 1.3 | </tr> |
| 317 : | <tr> | ||
| 318 : | oliviert | 1.7 | <th align=left valign=top>suppress</th> |
| 319 : | <td valign=top>enable @SuppressWarnings</td> | ||
| 320 : | </tr> | ||
| 321 : | <tr> | ||
| 322 : | <th align=left valign=top>syntheticAccess,<br>synthetic-access</th> | ||
| 323 : | oliviert | 1.4 | <td valign=top>when performing synthetic access for innerclass</td> |
| 324 : | oliviert | 1.3 | </tr> |
| 325 : | <tr> | ||
| 326 : | <th align=left valign=top>tasks</th> | ||
| 327 : | <td valign=top>enable support for tasks tags in source code</td> | ||
| 328 : | pmulet | 1.1 | </tr> |
| 329 : | oliviert | 1.4 | <tr> |
| 330 : | oliviert | 1.7 | <th align=left valign=top>typeHiding</th> |
| 331 : | <td valign=top>type parameter hiding another type</td> | ||
| 332 : | </tr> | ||
| 333 : | <tr> | ||
| 334 : | <th align=left valign=top>unchecked</th> | ||
| 335 : | <td valign=top>unchecked type operation</td> | ||
| 336 : | </tr> | ||
| 337 : | <tr> | ||
| 338 : | <th align=left valign=top>unnecessaryElse</th> | ||
| 339 : | <td valign=top>unnecessary else clause</td> | ||
| 340 : | </tr> | ||
| 341 : | <tr> | ||
| 342 : | <th align=left valign=top>unqualified-field-access,<br>unqualifiedField</th> | ||
| 343 : | oliviert | 1.4 | <td valign=top>unqualified reference to field</td> |
| 344 : | </tr> | ||
| 345 : | <tr> | ||
| 346 : | oliviert | 1.7 | <th align=left valign=top>unused</th> |
| 347 : | <td valign=top>macro for unusedArgument, unusedImport, unusedLocal, unusedPrivate and unusedThrown</td> | ||
| 348 : | oliviert | 1.4 | </tr> |
| 349 : | <tr> | ||
| 350 : | <th align=left valign=top>unusedArgument</th> | ||
| 351 : | <td valign=top>unused method argument</td> | ||
| 352 : | </tr> | ||
| 353 : | <tr> | ||
| 354 : | <th align=left valign=top>unusedImport</th> | ||
| 355 : | oliviert | 1.7 | <td valign=top>unused import reference</td> |
| 356 : | oliviert | 1.4 | </tr> |
| 357 : | <tr> | ||
| 358 : | <th align=left valign=top>unusedLocal</th> | ||
| 359 : | <td valign=top>unused local variable</td> | ||
| 360 : | </tr> | ||
| 361 : | <tr> | ||
| 362 : | <th align=left valign=top>unusedPrivate</th> | ||
| 363 : | <td valign=top>unused private member declaration</td> | ||
| 364 : | </tr> | ||
| 365 : | <tr> | ||
| 366 : | <th align=left valign=top>unusedThrown</th> | ||
| 367 : | <td valign=top>unused declared thrown exception</td> | ||
| 368 : | </tr> | ||
| 369 : | <tr> | ||
| 370 : | oliviert | 1.7 | <th align=left valign=top>uselessTypeCheck</th> |
| 371 : | <td valign=top>unnecessary cast/instanceof operation</td> | ||
| 372 : | </tr> | ||
| 373 : | <tr> | ||
| 374 : | <th align=left valign=top>varargsCast</th> | ||
| 375 : | <td valign=top>varargs argument need explicit cast</td> | ||
| 376 : | oliviert | 1.4 | </tr> |
| 377 : | <tr> | ||
| 378 : | oliviert | 1.7 | <th align=left valign=top>warningToken</th> |
| 379 : | <td valign=top>unhandled warning token in @SuppressWarningsb</td> | ||
| 380 : | oliviert | 1.4 | </tr> |
| 381 : | pmulet | 1.1 | </table> |
| 382 : | </td> | ||
| 383 : | </tr> | ||
| 384 : | <tr> | ||
| 385 : | <td valign=top>-nowarn</td> | ||
| 386 : | <td>No warning (equivalent to <font color="#3366FF">-warn:none</font>)</td> | ||
| 387 : | </tr> | ||
| 388 : | <tr> | ||
| 389 : | <td valign=top>-deprecation</td> | ||
| 390 : | <td>Equivalent to <font color="#3366FF">-warn:deprecation</font>.</td> | ||
| 391 : | </tr> | ||
| 392 : | <tr> | ||
| 393 : | oliviert | 1.4 | <th colspan="2">Debug options</th> |
| 394 : | </tr> | ||
| 395 : | <tr> | ||
| 396 : | pmulet | 1.1 | <td valign=top>-g[:none|:lines,vars,source] |
| 397 : | </td> | ||
| 398 : | <td>Set the debug attributes level<br> | ||
| 399 : | <table> | ||
| 400 : | <tr> | ||
| 401 : | <th align=left>-g</th> | ||
| 402 : | <td>All debug info (equivalent to <font color="#3366FF">-g:lines,vars,source</font>) | ||
| 403 : | </td> | ||
| 404 : | </tr> | ||
| 405 : | <th align=left>-g:none</th> | ||
| 406 : | <td>No debug info</td> | ||
| 407 : | </tr> | ||
| 408 : | <tr> | ||
| 409 : | <th align=left>-g:[lines,vars,source]</th> | ||
| 410 : | <td>Selective debug info</td> | ||
| 411 : | </tr> | ||
| 412 : | </table> | ||
| 413 : | </tr> | ||
| 414 : | <tr> | ||
| 415 : | <td valign=top>-preserveAllLocals</td> | ||
| 416 : | <td>Explicitly request the compiler to preserve all local variables (for debug purpose). If omitted, the compiler will removed unused locals.</td> | ||
| 417 : | </tr> | ||
| 418 : | <tr> | ||
| 419 : | oliviert | 1.4 | <th colspan="2">Advanced options</th> |
| 420 : | </tr> | ||
| 421 : | <tr> | ||
| 422 : | <td>@<file></td> | ||
| 423 : | <td valign=top>Read command-line arguments from file</td> | ||
| 424 : | pmulet | 1.1 | </tr> |
| 425 : | <tr> | ||
| 426 : | oliviert | 1.4 | <td>-maxProblems <n></td> |
| 427 : | <td valign=top>Max number of problems per compilation unit (100 by default)</td> | ||
| 428 : | pmulet | 1.1 | </tr> |
| 429 : | <tr> | ||
| 430 : | <td valign=top>-log <filename></td> | ||
| 431 : | <td>Specify a log file in which all output from the compiler will be dumped. This is really useful if you want to debug the batch | ||
| 432 : | oliviert | 1.7 | compiler or get a file which contains all errors and warnings from a batch build. If the extension is <b>.xml</b>, the generated log |
| 433 : | will be a xml file. | ||
| 434 : | </td> | ||
| 435 : | pmulet | 1.1 | </tr> |
| 436 : | <tr> | ||
| 437 : | <td valign=top>-proceedOnError</td> | ||
| 438 : | <td>Keep compiling when error, dumping class files with problem methods or problem types. This is recommanded only if you want | ||
| 439 : | to be able to run your application even if you have remaining errors.</td> | ||
| 440 : | </tr> | ||
| 441 : | <tr> | ||
| 442 : | <td valign=top>-verbose</td> | ||
| 443 : | <td>Print accessed/processed compilation units in the console or the log file if specified.</td> | ||
| 444 : | </tr> | ||
| 445 : | <tr> | ||
| 446 : | <td valign=top>-referenceInfo</td> | ||
| 447 : | <td>Compute reference info. This is useful only if connected to the builder. The reference infos are useless otherwise.</td> | ||
| 448 : | </tr> | ||
| 449 : | <tr> | ||
| 450 : | <td valign=top>-progress</td> | ||
| 451 : | <td>Show progress (only in -log mode)</td> | ||
| 452 : | </tr> | ||
| 453 : | <tr> | ||
| 454 : | <td valign=top>-time | ||
| 455 : | </td> | ||
| 456 : | <td>Display speed information</td> | ||
| 457 : | </tr> | ||
| 458 : | <tr> | ||
| 459 : | <td valign=top>-noExit</td> | ||
| 460 : | <td>Do not call <font color="#3366FF">System.exit(n)</font> at end of compilation (<font color="#3366FF">n=0</font> if no error)</td> | ||
| 461 : | </tr> | ||
| 462 : | <tr> | ||
| 463 : | <td valign=top>-repeat <n> | ||
| 464 : | </td> | ||
| 465 : | <td>Repeat compilation process <font color="#3366FF"><n></font> times (perf analysis).</td> | ||
| 466 : | oliviert | 1.4 | </tr> |
| 467 : | <tr> | ||
| 468 : | <td valign=top>-inlineJSR</td> | ||
| 469 : | <td>Inline JSR bytecode (implicit if target >= 1.5)</td> | ||
| 470 : | </tr> | ||
| 471 : | <tr> | ||
| 472 : | <td valign=top>-enableJavadoc</td> | ||
| 473 : | <td>Consider references inside javadoc</td> | ||
| 474 : | </tr> | ||
| 475 : | <tr> | ||
| 476 : | <th colspan="2">Helping options</th> | ||
| 477 : | </tr> | ||
| 478 : | <tr> | ||
| 479 : | <td>-? -help</td> | ||
| 480 : | <td valign=top>Display the help message</td> | ||
| 481 : | </tr> | ||
| 482 : | <tr> | ||
| 483 : | <td valign=top>-v -version</td> | ||
| 484 : | <td>Display the build number of the compiler. This is very useful to report a bug.</td> | ||
| 485 : | </tr> | ||
| 486 : | <tr> | ||
| 487 : | <td valign=top>-showversion</td> | ||
| 488 : | <td>Display the build number of the compiler and continue. This is very useful to report a bug.</td> | ||
| 489 : | pmulet | 1.1 | </tr> |
| 490 : | </table> | ||
| 491 : | </blockquote> | ||
| 492 : | </td> | ||
| 493 : | </tr> | ||
| 494 : | <tr> | ||
| 495 : | <td ALIGN=RIGHT VALIGN=TOP WIDTH="2%"><img SRC="http://dev.eclipse.org/images/Adarrow.gif" NOSAVE BORDER=0 height=16 width=16></td> | ||
| 496 : | |||
| 497 : | <td WIDTH="98%"><b>Examples</b> | ||
| 498 : | <blockquote> | ||
| 499 : | <table> | ||
| 500 : | <td valign=top><font color="#3366FF">d:\temp -classpath rt.jar -time -g -d d:/tmp</font> | ||
| 501 : | </td> | ||
| 502 : | <td valign=top>It compiles all source files in d:\temp and its subfolders. The classpath is simply rt.jar. It generates all debug | ||
| 503 : | attributes and all generated .class files are dumped in d:\tmp. The speed of the compiler will be displayed once the batch process | ||
| 504 : | is completed.</td> | ||
| 505 : | </tr> | ||
| 506 : | <tr> | ||
| 507 : | <td valign=top><font color="#3366FF">d:\temp\Test.java -classpath d:\temp;rt.jar -g:none</font> | ||
| 508 : | </td> | ||
| 509 : | <td valign=top>It compiles only Test.java and it will retrieve any dependant files from d:\temp. The classpath is rt.jar and d:\temp, which means that all necessary classes | ||
| 510 : | are searched first in d:\temp and then in rt.jar. It generates no debug attributes and all generated .class files are dumped in d:\tmp.</td> | ||
| 511 : | </table> | ||
| 512 : | </blockquote> | ||
| 513 : | </td> | ||
| 514 : | </tr> | ||
| 515 : | |||
| 516 : | </table> | ||
| 517 : | |||
| 518 : | |||
| 519 : | |||
| 520 : | </body> | ||
| 521 : | </html> |
| help@eclipse.org | ViewVC Help |
| Powered by ViewVC 1.0.3 |
