jdt-core-home/howto/batch compile/batchCompile.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Mon Dec 9 16:48:29 2002 UTC revision 1.4, Sat Jul 10 21:44:50 2004 UTC
# Line 81  Line 81 
81  <th>Usage</th>  <th>Usage</th>
82  </tr>  </tr>
83  <tr>  <tr>
84  <td>-help</td>  <th colspan="2">Classpath options</th>
 <td valign=top>Display the help message</td>  
 </tr>  
 <tr>  
 <td valign=top>-version</td>  
 <td>Display the build number of the compiler. This is very useful to report a bug.</td>  
85  </tr>  </tr>
86  <tr>  <tr>
87  <td valign=top bgcolor="#FFCCAA">-bootclasspath &lt;dir 1&gt;;&lt;dir 2&gt;;...;&lt;dir P&gt;</td>  <td valign=top bgcolor="#FFCCAA">-bootclasspath &lt;dir 1&gt;;&lt;dir 2&gt;;...;&lt;dir P&gt;</td>
88  <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  <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
89  VM are used.</td>  VM are used. Entries are separated by the platform path separator.</td>
90  </tr>  </tr>
91  <tr>  <tr>
92  <td valign=top bgcolor="#FFCCAA">-classpath &lt;dir 1&gt;;&lt;dir 2&gt;;...;&lt;dir P&gt;</td>  <td valign=top bgcolor="#FFCCAA">-cp -classpath &lt;dir 1&gt;;&lt;dir 2&gt;;...;&lt;dir P&gt;</td>
93  <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".  <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".
94     Entries are separated by the platform path separator.
95  </td>  </td>
96  </tr>  </tr>
97  <tr>  <tr>
# Line 104  Line 100 
100  If you don't want to generate .class files, use <font color="#3366FF">-d none</font>.</td>  If you don't want to generate .class files, use <font color="#3366FF">-d none</font>.</td>
101  </tr>  </tr>
102  <tr>  <tr>
103  <td valign=top>-target 1.1|1.2</td>  <td valign=top>-encoding &lt;encoding name&gt;</td>
104  <td>This specifies the classfile target setting. The possible value are <font color="#3366FF">1.1</font> or <font color="#3366FF">1.2</font>, default is <font color="#3366FF">1.1</font></td>  <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 &lt;encoding name&gt;]</font>).</td>
105    </tr>
106    <tr>
107    <th colspan="2">Compliance options</th>
108    </tr>
109    <tr>
110    <td valign=top>-target 1.1|1.2|1.3|1.4|1.5</td>
111    <td>This specifies the classfile target setting. The possible value are <font color="#3366FF">1.1</font> or <font color="#3366FF">1.2</font>, default is <font color="#3366FF">1.2</font></td>
112  </tr>  </tr>
113  <tr>  <tr>
114  <td valign=top>-1.3</td>  <td valign=top>-1.3</td>
115  <td>Set compliance level to <font color="#3366FF">1.3</font> (default)</td>  <td>Set compliance level to <font color="#3366FF">1.3</font>. Implicit -source 1.3 -target 1.1.</td>
116  </tr>  </tr>
117  <tr>  <tr>
118  <td valign=top>-1.4</td>  <td valign=top>-1.4</td>
119  <td>Set compliance level to <font color="#3366FF">1.4</font>.</td>  <td>Set compliance level to <font color="#3366FF">1.4</font> (default). Implicit -source 1.3 -target 1.2.</td>
120    </tr>
121    <tr>
122    <td valign=top>-1.5</td>
123    <td>Set compliance level to <font color="#3366FF">1.5</font>. Implicit -source 1.5 -target 1.5.</td>
124  </tr>  </tr>
125  <tr>  <tr>
126  <td valign=top>-source 1.3|1.4</td>  <td valign=top>-source 1.3|1.4|1.5</td>
127  <td>This is used to enable the assertion support of the compiler. The possible value are: <font color="#3366FF">1.3</font> or <font color="#3366FF">1.4</font>, default is <font color="#3366FF">1.3</font> in <font color="#3366FF">-1.3</font> mode and <font color="#3366FF">1.4</font> in <font color="#3366FF">-1.4</font> mode.  <td>This is used to enable the assertion support of the compiler. The possible value are: <font color="#3366FF">1.3</font> or <font color="#3366FF">1.4</font>, default is <font color="#3366FF">1.3</font> in <font color="#3366FF">-1.3</font> mode and <font color="#3366FF">1.4</font> in <font color="#3366FF">-1.4</font> mode.
128  In <font color="#3366FF">1.4</font>, <font color="#3366FF"><I>assert</I></font> is treated as a keyword.</td>  In <font color="#3366FF">1.4</font>, <font color="#3366FF"><I>assert</I></font> is treated as a keyword.</td>
129  </tr>  </tr>
130  <tr>  <tr>
131  <td valign=top>-warn: <blockquote>constructorName<br>|packageDefaultMethod<br>|deprecation<br>|maskedCatchBlocks<br>|unusedLocals<br>|unusedArguments<br>|unusedImports<br>|syntheticAccess<br>|assertIdentifier<br>|allDeprecation<br>|nls<br>|staticReceiver<br>|noEffectAssign<br>|noImplicitStringConversion<br>|tasks(&lt;task1&gt;|...|&lt;taskN&gt;)</blockquote>  <th colspan="2">Warning options</th>
132    </tr>
133    <tr>
134    <td valign=top>-warn:<blockquote>&nbsp;allDeprecation<br>|allJavadoc<br>|assertIdentifier<br>|charConcat<br>|conditionAssign<br>|constructorName
135    <br>|deprecation<br>|emptyBlock<br>|fieldHiding<br>|finalBound<br>|finally<br>|indirectStatic<br>|intfNonInherited<br>|javadoc<br>|localHiding
136    <br>|maskedCatchBlocks<br>|nls<br>|noEffectAssign<br>|pkgDefaultMethod<br>|semicolon<br>
137    |specialParamHiding<br>
138    |staticReceiver<br>|syntheticAccess<br>|tasks(&lt;task1&gt;|...|&lt;taskN&gt;)<br>|unqualifiedField<br>|unnecessaryElse<br>|uselessTypeCheck<br>
139    |unsafe<br>|unusedArgument<br>|unusedImport<br>|unusedLocal<br>|unusedPrivate<br>|unusedThrown</blockquote>
140  </td>  </td>
141  <td valign=top>Set warning level.<br>e.g. <font color="#3366FF">-warn:unusedLocals,deprecation</font><br>  <td valign=top>Set warning level.<br>e.g. <font color="#3366FF">-warn:unusedLocals,deprecation</font><br>
142    <p>
143    <pre>
144        -warn:<warnings separated by ,>    enable exactly the listed warnings
145        -warn:+<warnings separated by ,>   enable additional warnings
146        -warn:-<warnings separated by ,>   disable specific warnings
147    </pre>
148  <table>  <table>
149  <tr>  <tr>
150  <th align=left valign=top>constructorName</th>  <th align=left valign=top>allDeprecation</th>
151  <td valign=top>warn method with constructor name</td>  <td valign=top>deprecation even inside deprecated code</td>
152    </tr>
153    <tr>
154    <th align=left valign=top>allJavadoc</th>
155    <td valign=top>invalid or missing javadoc</td>
156    </tr>
157    <tr>
158    <th align=left valign=top>assertIdentifier</th>
159    <td valign=top>occurrence of <i>assert</i> used as identifier</td>
160    </tr>
161    <tr>
162    <th align=left valign=top>charConcat</th>
163    <td valign=top>when a char array is used in a string concatenation without being converted explicitely to
164    a string</td>
165    </tr>
166    <tr>
167    <th align=left valign=top>conditionAssign</th>
168    <td valign=top>possible accidental boolean assignment</td>
169  </tr>  </tr>
170  <tr>  <tr>
171  <th align=left valign=top>packageDefaultMethod</th>  <th align=left valign=top>constructorName</th>
172  <td valign=top>warn attempt to override package-default method</td>  <td valign=top>method with constructor name</td>
173  </tr>  </tr>
174  <tr>  <tr>
175  <th align=left valign=top>deprecation</th>  <th align=left valign=top>deprecation</th>
176  <td valign=top>warn usage of deprecated type or member</td>  <td valign=top>usage of deprecated type or member outside deprecated code</td>
177  </tr>  </tr>
178  <tr>  <tr>
179  <th align=left valign=top>maskedCatchBlocks</th>  <th align=left valign=top>emptyBlock</th>
180  <td valign=top>warn hidden catch block</td>  <td valign=top>undocumented empty block</td>
181  </tr>  </tr>
182  <tr>  <tr>
183  <th align=left valign=top>unusedLocals</th>  <th align=left valign=top>fieldHiding</th>
184  <td valign=top>warn unused local variable</td>  <td valign=top>field hiding another variable</td>
185  </tr>  </tr>
186  <tr>  <tr>
187  <th align=left valign=top>unusedArguments</th>  <th align=left valign=top>finalBound</th>
188  <td valign=top>warn unused method argument</td>  <td valign=top>type parameter with final bound</td>
189  </tr>  </tr>
190  <tr>  <tr>
191  <th align=left valign=top>unusedImports</th>  <th align=left valign=top>finally</th>
192  <td valign=top>When enabled, the compiler will issue an error or a warning for unused import reference  <td valign=top>finally block not completing normally</td>
 </td>  
193  </tr>  </tr>
194  <tr>  <tr>
195  <th align=left valign=top>syntheticAccess</th>  <th align=left valign=top>intfNonInherited</th>
196  <td valign=top>warn when performing synthetic access for innerclass</td>  <td valign=top>interface non-inherited method compatibility</td>
197  </tr>  </tr>
198  <tr>  <tr>
199  <th align=left valign=top>assertIdentifier</th>  <th align=left valign=top>javadoc</th>
200  <td valign=top>warn occurrence of <i>assert</i> used as identifier</td>  <td valign=top>invalid javadoc</td>
201  </tr>  </tr>
202  <tr>  <tr>
203  <th align=left valign=top>allDeprecation</th>  <th align=left valign=top>localHiding</th>
204  <td valign=top>warn for deprecation even in deprecated code</td>  <td valign=top>local variable hiding another variable</td>
205  </tr>  </tr>
206  <tr>  <tr>
207  <th align=left valign=top>nls</th>  <th align=left valign=top>maskedCatchBlocks</th>
208  <td>warn non-nls string literals (lacking of tags //$NON-NLS-&lt;n&gt;)</td>  <td valign=top>hidden catch block</td>
209  </tr>  </tr>
210  <tr>  <tr>
211  <th align=left valign=top>staticReceiver</th>  <th align=left valign=top>nls</th>
212  <td valign=top>warn if a non static receiver is used to get a static field or call a static method</td>  <td>non-nls string literals (lacking of tags //$NON-NLS-&lt;n&gt;)</td>
213  </tr>  </tr>
214  <tr>  <tr>
215  <th align=left valign=top>noEffectAssign</th>  <th align=left valign=top>noEffectAssign</th>
216  <td valign=top>warn for assignment with no effect</td>  <td valign=top>for assignment with no effect</td>
217  </tr>  </tr>
218  <tr>  <tr>
219  <th align=left valign=top>noImplicitStringConversion</th>  <th align=left valign=top>pkgDefaultMethod</th>
220  <td valign=top>warn when a char array is used in a string concatenation without being converted explicitely to  <td valign=top>attempt to override package-default method</td>
221  a string</td>  </tr>
222    <tr>
223    <th align=left valign=top>semicolon</th>
224    <td valign=top>unnecessary semicolon or empty statement</td>
225    </tr>
226    <tr>
227    <th align=left valign=top>specialParamHiding</th>
228    <td valign=top>constructor or setter parameter hiding another field</td>
229    </tr>
230    <tr>
231    <th align=left valign=top>staticReceiver</th>
232    <td valign=top>if a non static receiver is used to get a static field or call a static method</td>
233    </tr>
234    <tr>
235    <th align=left valign=top>syntheticAccess</th>
236    <td valign=top>when performing synthetic access for innerclass</td>
237  </tr>  </tr>
238  <tr>  <tr>
239  <th align=left valign=top>tasks</th>  <th align=left valign=top>tasks</th>
240  <td valign=top>enable support for tasks tags in source code</td>  <td valign=top>enable support for tasks tags in source code</td>
241  </tr>  </tr>
242    <tr>
243    <th align=left valign=top>unqualifiedField</th>
244    <td valign=top>unqualified reference to field</td>
245    </tr>
246    <tr>
247    <th align=left valign=top>unsafe</th>
248    <td valign=top>unsafe type operation</td>
249    </tr>
250    <tr>
251    <th align=left valign=top>unusedArgument</th>
252    <td valign=top>unused method argument</td>
253    </tr>
254    <tr>
255    <th align=left valign=top>unusedImport</th>
256    <td valign=top>When enabled, the compiler will issue an error or a warning for unused import reference
257    </td>
258    </tr>
259    <tr>
260    <th align=left valign=top>unusedLocal</th>
261    <td valign=top>unused local variable</td>
262    </tr>
263    <tr>
264    <th align=left valign=top>unusedPrivate</th>
265    <td valign=top>unused private member declaration</td>
266    </tr>
267    <tr>
268    <th align=left valign=top>unusedThrown</th>
269    <td valign=top>unused declared thrown exception</td>
270    </tr>
271    <tr>
272    <th align=left valign=top>unnecessaryElse</th>
273    <td valign=top>unnecessary else clause</td>
274    </tr>
275    <tr>
276    <th align=left valign=top>uselessTypeCheck</th>
277    <td valign=top>unnecessary cast/instanceof operation</td>
278    </tr>
279  </table>  </table>
280  </td>  </td>
281  </tr>  </tr>
# Line 199  Line 288 
288  <td>Equivalent to <font color="#3366FF">-warn:deprecation</font>.</td>  <td>Equivalent to <font color="#3366FF">-warn:deprecation</font>.</td>
289  </tr>  </tr>
290  <tr>  <tr>
291    <th colspan="2">Debug options</th>
292    </tr>
293    <tr>
294  <td valign=top>-g[:none|:lines,vars,source]  <td valign=top>-g[:none|:lines,vars,source]
295  </td>  </td>
296  <td>Set the debug attributes level<br>  <td>Set the debug attributes level<br>
# Line 222  Line 314 
314  <td>Explicitly request the compiler to preserve all local variables (for debug purpose). If omitted, the compiler will removed unused locals.</td>  <td>Explicitly request the compiler to preserve all local variables (for debug purpose). If omitted, the compiler will removed unused locals.</td>
315  </tr>  </tr>
316  <tr>  <tr>
317  <td valign=top>-noImportError</td>  <th colspan="2">Advanced options</th>
 <td>The compiler won't report an error for unresolved imports. A warning is issued instead.</td>  
318  </tr>  </tr>
319  <tr>  <tr>
320  <td valign=top>-encoding &lt;encoding name&gt;</td>  <td>@&lt;file&gt;</td>
321  <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 &lt;encoding name&gt;]</font>).</td>  <td valign=top>Read command-line arguments from file</td>
322    </tr>
323    <tr>
324    <td>-maxProblems&nbsp;&lt;n&gt;</td>
325    <td valign=top>Max number of problems per compilation unit (100 by default)</td>
326  </tr>  </tr>
327  <tr>  <tr>
328  <td valign=top>-log &lt;filename&gt;</td>  <td valign=top>-log &lt;filename&gt;</td>
# Line 265  Line 360 
360  </td>  </td>
361  <td>Repeat compilation process <font color="#3366FF">&lt;n&gt;</font> times (perf analysis).</td>  <td>Repeat compilation process <font color="#3366FF">&lt;n&gt;</font> times (perf analysis).</td>
362  </tr>  </tr>
363    <tr>
364    <td valign=top>-inlineJSR</td>
365    <td>Inline JSR bytecode (implicit if target >= 1.5)</td>
366    </tr>
367    <tr>
368    <td valign=top>-enableJavadoc</td>
369    <td>Consider references inside javadoc</td>
370    </tr>
371    <tr>
372    <th colspan="2">Helping options</th>
373    </tr>
374    <tr>
375    <td>-? -help</td>
376    <td valign=top>Display the help message</td>
377    </tr>
378    <tr>
379    <td valign=top>-v -version</td>
380    <td>Display the build number of the compiler. This is very useful to report a bug.</td>
381    </tr>
382    <tr>
383    <td valign=top>-showversion</td>
384    <td>Display the build number of the compiler and continue. This is very useful to report a bug.</td>
385    </tr>
386  </table>  </table>
387  </blockquote>  </blockquote>
388  </td>  </td>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4