blob: 295cc5957b26939c20d5ca539a7da4a0d145f8be [file] [log] [blame]
Stephan Herrmannfc918f42017-10-14 19:16:55 +02001.TH ecj "13 March 2017"
Stephan Herrmann93860df2015-09-29 17:45:49 +02002.LP
3.SH NAME
4ecj \- the eclipse JDT Batch Compiler
Stephan Herrmannfc918f42017-10-14 19:16:55 +02005
Stephan Herrmann93860df2015-09-29 17:45:49 +02006.SH SYNOPSIS
7.B ecj [OPTION]... [SOURCEFILE]...
8.B ...
9.SH DESCRIPTION
10.B ecj is the batch compiler from Eclipse and is available as ecj.jar.
11Since 3.3, this jar also contains the support for jsr199 (Compiler API)
12and the support for jsr269 (Annotation processing). In order to use the
13annotations processing support, a 1.6 VM is required.
14
15.SH OPTIONS SUMMARY
16.sp
17Here is a summary of all the options, grouped by type. Explanations are in the \fBOPTIONS\fR section.
18.sp
19.ul
Stephan Herrmannfc918f42017-10-14 19:16:55 +020020Module Options
21.sp
Stephan Herrmann11a49932017-11-24 22:27:38 +010022.B --add-exports \--add-modules \--add-reads \--limit-modules \-p|--module-path \--module-source-path \ --processor-module-path \--system
Stephan Herrmannfc918f42017-10-14 19:16:55 +020023.sp
24.ul
Stephan Herrmann93860df2015-09-29 17:45:49 +020025ClassPath Options
26.sp
27.B \-bootclasspath \-cp|\-classpath \-extdirs \-endorseddirs \-sourcepath \-d \-encoding
28.sp
29.ul
30Compliance Options
31.sp
Stephan Herrmann11a49932017-11-24 22:27:38 +010032.B \-target \-1.3 \-1.4 \-1.5 \-1.6 \-1.7 \-1.8 \1.9 \-source \ --release
Stephan Herrmann93860df2015-09-29 17:45:49 +020033.sp
34.ul
35Warning Options
36.sp
37.B \-?:warn \-help:warn \-warn:... \-nowarn \-err:... \-deprecation \-properties
38.sp
39.ul
40Debug Options
41.sp
42\fB\-g \-preserveAllLocals \-parameters
43.sp
44.ul
45Annotation Processing Options
46.sp
47\-Akey[=\fIvalue\fB] \-proc:[only|none] \-processor \-processorpath \-s \-XprintProcessorInfo \-XprintRounds \-classNames\fR
48.sp
49.ul
50Ignored Options (for compatibility with javac options)
51.sp
52.B \-J \-X \-O
53.sp
54.ul
55Advanced Options
56.sp
57\fB@<file> \-maxProblems \-log \-Xemacs \-proceedOnError \-verbose \-referenceInfo \-progress \-time \-noExit \-repeat \-inlineJSR \-enableJavaDoc \-missingNullDefault
58.sp
59.ul
60Helping Options
61.sp
62\-? \-help \-v \-version \-showversion
63
64.SH OPTIONS
65.sp
66.ul
Stephan Herrmannfc918f42017-10-14 19:16:55 +020067Module Options (Supported from 9 onwards)
68
69.B
Stephan Herrmann11a49932017-11-24 22:27:38 +010070.IP "--add-exports <source-module>/<package>=<target-module>(,<target-module>)*"
71A command line form of exports statement which exports the package in source-module to the comma separated list of target modules.
72
73.B
74.IP "--add-modules <module 1>,<module 2>,...,<module P>"
75Extend the default set of root modules with a list of comma separated modules.
76
77.B
78.IP "--add-reads <source-module>=<target-module>
79A command line form of a requires clause equivalent to adding requires source-module in target modules module-info file.
80
81.B
82.IP "--limit-modules <module 1>,<module 2>,...,<module P>"
83Limit the observable modules to the list of comma separated modules.
84
85.B
Stephan Herrmannfc918f42017-10-14 19:16:55 +020086.IP "-p|--module-path <dir 1>;<dir 2>;...;<dir P>"
87This is a list of directories where application modules can be found. Entries are separated by the platform path separator.
88
89.B
90.IP "--module-source-path <dir 1>;<dir 2>;...;<dir P>"
91This is a list of directories where source files for modules can be found. Entries are separated by the platform path separator.
92
Stephan Herrmann11a49932017-11-24 22:27:38 +010093.B
94.IP "--processor-module-path <path>"
95 module path where annotation processors can be found.
Stephan Herrmannfc918f42017-10-14 19:16:55 +020096
97.B
98.IP "--system <jdk>"
99 Override location of system modules.
100
101.P
102.ul
Stephan Herrmann93860df2015-09-29 17:45:49 +0200103ClassPath Options
104
105.B
106.IP "\-bootclasspath <dir 1>;<dir 2>;...;<dir P>"
107This is a list of directories or jar files used to bootstrap the class files used by the compiler. By default the libraries of the running VM are used. Entries are separated by the platform path separator.
108Each directory or file can specify access rules for types between '[' and ']'.
109If no bootclasspath is specified, the compiler will infer it using the following system properties sun.boot.class.path, vm.boot.class.path or org.apache.harmony.boot.class.path in this order respectively
110
111.B
112.IP "\-cp|\-classpath <dir 1>;dir2;...<dir P>"
113This is a list of directories or jar files used to compile the source files. The default value is the value of the property "java.class.path". Entries are separated by the platform path separator.
114Each directory or file can specify access rules for types between '[' and ']' (e.g. [\-X] to forbid access to type X, [~X] to discourage access to type X, [+p/X:\-p/*] to forbid access to all types in package p but allow access to p/X).
115The compiler follows the Class-Path clauses of jar files' manifests recursively and appends each referenced jar file to the end of the classpath, provided it is not on the classpath yet.
116
117.B
118.IP "\-extdirs <dir 1>;<dir 2>;...;<dir P>"
119This is a list of directories used to specify the location of extension zip/jar files. Entries are separated by the platform path separator.
120
121.B
122.IP "\-endorseddirs <dir 1>;<dir 2>;...;<dir P>"
123This is a list of directories used to specify the location of endorsed zip/jar files. Entries are separated by the platform path separator.
124
125.B
126.IP "\-sourcepath <dir 1>;<dir 2>;...;<dir P>"
127This is a list of directories used to specify the source files. Entries are separated by the platform path separator. Each directory can specify access rules for types between '[' and ']'.
128
129.B
130.IP "\-d <dir 1>|none"
131This is used to specify in which directory the generated .class files should be dumped. If it is omitted, no package directory structure is created.
132If you want to generate no .class file at all, use \-d none.
133
134.B
135.IP "\-encoding <encoding name>"
136Specify default encoding for all source files. Custom encoding can also be specified on a per file basis by suffixing each input source file/folder name with [<encoding name>]. For example X.java[UTF-8] would specify the UTF-8 encoding for the compilation unit X.java located in the current user directory.
137If multiple default source file encodings are specified, the last one will be used.
138
139For example:
140.B ... \-encoding UTF-8 X.java[Cp1252] Y.java[UTF-16] Z.java ....
141.br
142All source files will be read using UTF-8 encoding (this includes Z.java). X.java will be read using Cp1252 encoding and Y.java will be read using UTF-16 encoding.
143.sp
144.B ... \-encoding UTF-8 -encoding UTF-16 ....
145.br
146All source files will be read using UTF-16 encoding. The \-encoding option for UTF-8 is ignored.
147.sp
148.B ... \-encoding Cp1252 /foo/bar/X.java[UTF-16] /foo/bar[UTF-8] ....
149.br
150All source files will be read using Cp1252 encoding. X.java is the only file inside the /foo/bar directory to be read using the encoding UTF-16. All other files in that directory will use UTF-8 encoding.
151
152.P
153.ul
154Compliance Options
155
156.B
Stephan Herrmannfc918f42017-10-14 19:16:55 +0200157.IP "\-target 1.1 to 1.9 (or 9, 9.0, etc.)"
Stephan Herrmann93860df2015-09-29 17:45:49 +0200158This specifies the .class file target setting. The possible value are:
159.br
160.B 1.1
161(major version: 45 minor: 3)
162.br
163.B 1.2
164(major version: 46 minor: 0)
165.br
166.B 1.3
167(major version: 47 minor: 0)
168.br
169.B 1.4
170(major version: 48 minor: 0)
171.br
172.B 1.5, 5 or 5.0
173(major version: 49 minor: 0)
174.br
175.B 1.6, 6 or 6.0
176(major version: 50 minor: 0)
177.br
178.B 1.7, 7 or 7.0
179(major version: 51 minor: 0)
180.br
181.B 1.8, 8 or 8.0
182(major version: 52 minor: 0)
Stephan Herrmannfc918f42017-10-14 19:16:55 +0200183.br
184.B 1.9, 9 or 9.0
185(major version: 53 minor: 0)
Stephan Herrmann93860df2015-09-29 17:45:49 +0200186
187Defaults are:
188.br
1891.1 in \-1.3 mode
190.br
1911.2 in \-1.4 mode
192.br
1931.5 in \-1.5 mode
194.br
1951.6 in \-1.6 mode
196.br
1971.7 in \-1.7 mode
198.br
1991.8 in \-1.8 mode
Stephan Herrmannfc918f42017-10-14 19:16:55 +0200200.br
2011.9 in \-1.9 mode
Stephan Herrmann93860df2015-09-29 17:45:49 +0200202clcd1.1 can be used to generate the StackMap attribute.
203
204.B
205.IP \-1.3
206Set compliance level to 1.3. Implicit \-source 1.3 \-target 1.1.
207
208.B
209.IP \-1.4
210Set compliance level to 1.4 (default). Implicit \-source 1.3 \-target 1.2.
211
212.B
213.IP \-1.5
214Set compliance level to 1.5. Implicit \-source 1.5 \-target 1.5.
215
216.B
217.IP \-1.6
218Set compliance level to 1.6. Implicit \-source 1.6 \-target 1.6.
219
220.B
221.IP \-1.7
222Set compliance level to 1.7. Implicit \-source 1.7 \-target 1.7.
223
224.B
225.IP \-1.8
226Set compliance level to 1.8. Implicit \-source 1.8 \-target 1.8.
227
228.B
Stephan Herrmannfc918f42017-10-14 19:16:55 +0200229.IP \-1.9
230Set compliance level to 1.9. Implicit \-source 1.9\-target 1.9.
231
232.B
233.IP "\-source 1.1 to 1.9 (or 9, 9.0, etc.)"
Stephan Herrmann93860df2015-09-29 17:45:49 +0200234This is used to specify the source level expected by the compiler.
235The possible value are:
236.br
237.B 1.3
238.br
239.B 1.4
240.br
241.B 1.5, 5 or 5.0
242.br
243.B 1.6, 6 or 6.0
244.br
245.B 1.7, 7 or 7.0
246.br
247.B 1.8, 8 or 8.0
Stephan Herrmannfc918f42017-10-14 19:16:55 +0200248.br
249.B 1.9, 9 or 9.0
Stephan Herrmann93860df2015-09-29 17:45:49 +0200250
251Defaults are:
252.br
2531.3 in \-1.3 mode
254.br
2551.3 in \-1.4 mode
256.br
2571.5 in \-1.5 mode
258.br
2591.6 in \-1.6 mode
260.br
2611.7 in \-1.7 mode
262.br
2631.8 in \-1.8 mode
264.br
Stephan Herrmannfc918f42017-10-14 19:16:55 +02002651.9 in \-1.9 mode
266.br
Stephan Herrmann93860df2015-09-29 17:45:49 +0200267In 1.4, assert is treated as a keyword. In 1.5 and 1.6, enum and assert are treated as keywords.
268
Stephan Herrmann11a49932017-11-24 22:27:38 +0100269.B
270.IP "--release N"
271Compile for a specific VM version. Used for compiling against older APIs.
272
Stephan Herrmann93860df2015-09-29 17:45:49 +0200273.P
274.ul
275Warning Options
276
277.B
278.IP "\-?:warn \-help:warn"
279Display advanced warning options
280
281.B
282.IP "\-warn:..."
283Specify the set of enabled warnings.
284.br
285.B \-warn:none\fR \t\t\t\t\t\tdisable all warnings
286.br
287.B \-warn:\fI<warning tokens separated by ,>\fR \tenable exactly the listed warnings
288.br
289.B \-warn:+\fI<warning tokens separated by ,>\fR \tenable additional warnings
290.br
291.B \-warn:\-\fI<warning tokens separated by ,>\fR \tdisable specific warnings
292
293Examples:
294
295.B\-warn:unusedLocal,deprecation
296.br
297enables only the given two warning options and disables all the other options
298.sp
299.B\-warn:\-unusedLocal,deprecation,+fallthrough
300.br
301disables unusedLocal and deprecation, enables fallthrough, and leaves the other warning options untouched
302.sp
303The first column below shows the default state for an option. A mark "+/-" indicates that an option covers several fine grained warning variants, some of which are enabled by default, others disabled. This means that specifying the given option with "+" will enable more warnings than the default, and specifying "-" disables some that are enabled by default.
304.sp
305
306+/-
307.B allDeadCode
308dead code including trivial if (DEBUG) check
309.sp
310+/-
311.B allDeprecation
312deprecation even inside deprecated code
313.sp
314\ -\
315.B allJavadoc
316invalid or missing Javadoc
317.sp
318\ -\
319.B allOver-ann
320all missing @Override annotations (superclass and superinterfaces)
321.sp
322\ -\
323.B all-static-method
324all method can be declared as static warnings
325.sp
326\ +\
327.B assertIdentifier
328occurrence of assert used as identifier
329.sp
330\ -\
331.B boxing
332autoboxing conversion
333.sp
334\ +\
335.B charConcat
336when a char array is used in a string concatenation without being converted explicitly to a string
337.sp
338\ +\
339.B compareIdentical
340comparing identical expressions
341.sp
342\ -\
343.B conditionAssign
344possible accidental boolean assignment
345.sp
346\ +\
347.B constructorName
348method with constructor name
349.sp
350\ +\
351.B deadCode
352dead code excluding trivial if (DEBUG) check
353.sp
354\ -\
355.B dep\-ann
356missing @Deprecated annotation
357.sp
358+/-
359.B deprecation
360usage of deprecated type or member outside deprecated code
361.sp
362\ +\
363.B discouraged
364use of types matching a discouraged access rule
365.sp
366\ -\
367.B emptyBlock
368undocumented empty block
369.sp
370\ +\
371.B enumIdentifier
372occurrence of enum used as identifier
373.sp
374\ +\
375.B enumSwitch
376incomplete enum switch
377.sp
378\ -\
379.B enumSwitchPedantic
380report missing enum switch cases even in the presence of a default case
381.sp
382\ -\
383.B fallthrough
384possible fall-through case
385.sp
386\ -\
387.B fieldHiding
388field hiding another variable
389.sp
390\ +\
391.B finalBound
392type parameter with final bound
393.sp
394\ +\
395.B finally
396finally block not completing normally
397.sp
398\ +\
399.B forbidden
400use of types matching a forbidden access rule
401.sp
402\ -\
403.B hashCode
404missing hashCode() method when overriding equals()
405.sp
406+/-
407.B hiding
408macro for fieldHiding, localHiding, maskedCatchBlock, and typeHiding
409.sp
410\ -\
411.B includeAssertNull
412raise null warnings for variables that got tainted in an assert expression
413.sp
414\ -\
415.B indirectStatic
416indirect reference to static member
417.sp
418\ -\
419.B inheritNullAnnot
420consider null annotations as being inherited from an overridden method to any overriding methods
421.sp
422\ +\
423.B intfAnnotation
424annotation type used as super interface
425.sp
426\ +\
427.B intfNonInherited
428interface non-inherited method compatibility
429.sp
430\ -\
431.B intfRedundant
432find redundant superinterfaces
433.sp
434\ -\
435.B invalidJavadoc
436macro to toggle the 'malformed Javadoc comments' option and all its sub-options listed below
437.sp
438\ -\
439.B invalidJavadocTag
440report invalid Javadoc tags in Javadoc comments.
441.sp
442\ -\
443.B invalidJavadocTagDep
444report invalid deprecated references in Javadoc tag arguments
445.sp
446\ -\
447.B invalidJavadocTagNotVisible
448report invalid non-visible references in Javadoc tag arguments
449.sp
450\ -\
451.B invalidJavadocVisibility(\fI<visibility>\fB)
452specify visibility modifier ("public", "protected" or "private") for malformed Javadoc tag warnings. Usage example: invalidJavadocVisibility(public)
453.sp
454\ -\
455.B javadoc
456invalid Javadoc
457.sp
458\ -\
459.B localHiding
460local variable hiding another variable
461.sp
462\ +\
463.B maskedCatchBlock
464hidden catch block
465.sp
466\ -\
467.B missingJavadocTags
468macro to toggle the 'missing Javadoc tags' option and all its sub-options listed below
469.sp
470\ -\
471.B missingJavadocTagsMethod
472report missing Javadoc tags for a method's type parameters
473.sp
474\ -\
475.B missingJavadocTagsOverriding
476report missing Javadoc tags in overriding methods
477.sp
478\ -\
479.B missingJavadocTagsVisibility(\fI<visibility>\fB)
480specify visibility modifier ("public", "protected" or "private") for missing Javadoc tags warnings. Usage example: missingJavadocTagsVisibility(public)
481.sp
482\ -\
483.B missingJavadocComments
484macro to toggle the 'missing Javadoc comments' option and all its sub-options listed below
485.sp
486\ -\
487.B missingJavadocCommentsOverriding
488report missing Javadoc comments in overriding methods
489.sp
490\ -\
491.B missingJavadocCommentsVisibility(\fI<visibility>\fB)
492specify visibility modifier ("public", "protected" or "private") for missing Javadoc comments warnings. Usage example: missingJavadocCommentsVisibility(public)
493.sp
494\ -\
495.B nls
496non-nls string literals (lacking of tags //$NON-NLS-<n>)
497.sp
498\ +\
499.B noEffectAssign
500assignment with no effect
501.sp
502\ +\
503.B nonnullNotRepeated
504nonnull parameter annotation from overridden method is not repeated in an overriding method. Is effective only with the nullAnnot option enabled.
505.sp
506+/-
507.B null
508potential missing or redundant null check
509.sp
510\ -\
511.B nullAnnot
512enable annotation based null analysis.
513If desired, the annotation types to be interpreted by the compiler can be specified by appending (nullable|nonnull|nonnullbydefault), where each annotation type is specified using its fully qualified name.
514Usage example: nullAnnot(p.Nullable|p.NonNull|p.NonNullByDefault)
515.sp
516Enabling this option enables all null-annotation related sub-options. These can be individually controlled using options listed below
517.sp
518\ -\
519.B nullAnnotConflict
520report conflicts between null annotation specified and nullness inferred. Is effective only with the nullAnnot option enabled.
521.sp
522\ -\
523.B nullAnnotRedundant
524report redundant specification of null annotation. Is effective only with the nullAnnot option enabled.
525.sp
526\ -\
527.B nullDereference
528missing null check
529.sp
530\ -\
531.B nullUncheckedConversion
532report unchecked conversion from unannotated type to @NonNull type. Is effective only with the nullAnnot option enabled.
533.sp
534\ -\
535.B over-ann
536missing @Override annotation (superclass only)
537.sp
538\ -\
539.B paramAssign
540assignment to a parameter
541.sp
542\ +\
543.B pkgDefaultMethod
544attempt to override package-default method
545.sp
546\ +\
547.B raw
548usage a of raw type (instead of a parameterized type)
549.sp
550+/-
551.B resource
552(potentially) unsafe usage of resource of type Closeable
553.sp
554\ -\
555.B semicolon
556unnecessary semicolon or empty statement
557.sp
558\ +\
559.B serial
560missing serialVersionUID
561.sp
562\ -\
563.B specialParamHiding
564constructor or setter parameter hiding another field
565.sp
566+/-
567.B static-access
568macro for indirectStatic and staticReceiver
569.sp
570\ -\
571.B static-method
572an instance method that could be as a static method
573.sp
574\ +\
575.B staticReceiver
576if a non static receiver is used to get a static field or call a static method
577.sp
578\ -\
579.B super
580overriding a method without making a super invocation
581.sp
582\ +\
583.B suppress
584enable @SuppressWarnings
585.sp
586\ -\
587.B switchDefault
588switch statement lacking a default case
589.sp
590\ -\
591.B syncOverride
592missing synchronized in synchronized method override
593.sp
594\ -\
595.B syntacticAnalysis
596perform syntax-based null analysis for fields
597.sp
598\ -\
599.B syntheticAccess
600when performing synthetic access for innerclass
601.sp
602\ -\
603.B tasks
604enable support for tasks tags in source code
605.sp
606\ +\
607.B typeHiding
608type parameter hiding another type
609.sp
610\ +\
611.B unavoidableGenericProblems
612report even unavoidable type safety problems due to raw APIs
613.sp
614\ +\
615.B unchecked
616unchecked type operation
617.sp
618\ -\
619.B unnecessaryElse
620unnecessary else clause
621.sp
622\ -\
623.B unqualifiedField
624unqualified reference to field
625.sp
626+/-
627.B unused
628macro for unusedImport, unusedLabel, unusedLocal, unusedPrivate, unusedThrown, unusedTypeArgs, and unusedTypeParameter
629.sp
630\ -\
631.B unusedAllocation
632allocating an object that is not used
633.sp
634\ -\
635.B unusedArgument
636unused method parameter (deprecated option; use unusedParam instead)
637.sp
638\ +\
639.B unusedImport
640unused import reference
641.sp
642\ +\
643.B unusedLabel
644unused label
645.sp
646\ +\
647.B unusedLocal
648unused local variable
649.sp
650\ +\
651.B unusedParam
652unused method parameter
653.sp
654\ +\
655.B unusedParamImplementing
656unused parameter for implementing method
657.sp
658\ +\
659.B unusedParamIncludeDoc
660unused parameter documented in a Javadoc comment tag
661.sp
662\ +\
663.B unusedParamOverriding
664unused parameter for overriding method
665.sp
666\ +\
667.B unusedPrivate
668unused private member declaration
669.sp
670\ -\
671.B unusedThrown
672unused declared thrown exception
673.sp
674\ -\
675.B unusedThrownIncludeDocComment
676unused declared thrown exception documented in a Javadoc comment tag
677.sp
678\ -\
679.B unusedThrownExemptExceptionThrowable
680report unused declared thrown exception but exempt Exception and Throwable
681.sp
682\ -\
683.B unusedThrownWhenOverriding
684unused declared thrown exception in overriding method
685.sp
686\ +\
687.B unusedTypeArgs
688unused type arguments for method and constructor
689.sp
690\ +\
691.B unusedTypeParameter
692unused type parameter
693.sp
694\ -\
695.B uselessTypeCheck
696unnecessary cast/instanceof operation
697.sp
698\ +\
699.B varargsCast
700varargs argument need explicit cast
701.sp
702+/-
703.B warningToken
704unhandled or unused warning token in @SuppressWarnings
705.in
706
707.B
708.IP "\-nowarn"
709No warning (equivalent to \-warn:none)
710.B
711.IP "\-err:..."
712Specify the set of enabled warnings that are converted to errors.
713.br
714E.g.
715.br
716.B \-err:unusedLocal,deprecation
717.br
718unusedLocal and deprecation warnings will be converted to errors. All other warnings are still reported as warnings.
719
720.B \-err:\fI<warning tokens separated by ,>\fR \tconvert exactly the listed warnings to errors
721.br
722.B \-err:+\fI<warning tokens separated by ,>\fR \tconvert additional warnings to errors
723.br
724.B \-err:\-\fI<warning tokens separated by ,>\fR \tremove specific warnings from being converted to errors
725
726.B
727.IP \-deprecation
728Equivalent to \-warn:+deprecation.
729.B
730.IP "\-properties <file>"
731Set warnings/errors option based on the properties file contents. This option can be used with \-nowarn, \-err:.. or \-warn:.. options, but the last one on the command line sets the options to be used.
732
733The properties file contents can be generated by setting project specific settings on an existing java project and using the file in .settings/org.eclipse.jdt.core.prefs file as a properties file, or a simple text file that is defined entry/value pairs using the constants defined in the org.eclipse.jdt.core.JavaCore class. Of those constants declared in this class, all options starting with "org.eclipse.jdt.core.compiler." are interpreted by the batch compiler.
734
735 ...
736.br
737org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
738.br
739org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
740.br
741org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
742.br
743 ...
744.sp
745To ensure that a property file has the same effect when used in the IDE and for the batch compiler, use of the \-properties option will change the defaults for a few options:
746
747.br
748.B \-g\fR \t\t\t\t\tdefault changed to all enabled
749.br
750.B \-preserveAllLocals\fR \t\tdefault changed to enabled
751.br
752.B \-enableJavadoc\fR \t\tdefault changed to enabled
753.br
754error/warning \fBforbidden\fR \tdefault changed to error
755
756.P
757.ul
758Debug Options
759
760.B
761.IP "\-g[:none|:lines,vars,source]"
762Set the debug attributes level
763.br
764.B \-g\fR \t\t\t\t\tAll debug info (equivalent to \-g:lines,vars,source)
765.br
766.B \-g:none\fR \t\t\t\tNo debug info
767.br
768.B \-g:[lines,vars,source]\fR \tSelective debug info
769.br
770Not specifying this option is equivalent to setting \-g:lines,source.
771
772.B
773.IP "\-preserveAllLocals"
774Explicitly request the compiler to preserve all local variables (for debug purpose). If omitted, the compiler will remove unused locals.
775.B
776.IP "\-parameters"
777Explicitly request the compiler to preserve information about the formal parameters of a method (such as their names) to be accessed from reflection libraries, annotation processing, code weaving, and in the debugger. This option is supported from target level 1.8 and later.
778Annotation processing options (require a 1.6 VM or above and are used only if the compliance is 1.6)
779
780.P
781.ul
782Annotation Processing Options
783
784.B
785.IP "\-Akey[=value]"
786Annotation processors options that are passed to annotation processors. key is made of identifiers separated by dots
787
788.B
789.IP "\-proc:[only|none]"
790If \-proc:only is specified, the annotation processors will run but no compilation will be performed. If \-proc:none is specified, annotation processors will not be discovered or run; compilation will proceed as if no annotation processors were found. By default the compiler must search the classpath for annotation processors, so specifying \-proc:none may speed compilation if annotation processing is not required.
791.B
792.IP "\-processor <class1[,class2,...]>"
793Qualified class names of annotation processors to run. If specified, the normal processor discovery process will be skipped.
794.B
795.IP "\-processorpath <dir 1>;<dir 2>;...;<dir P>"
796A list of directories or jar files which will be searched for annotation processors. Entries are separated by the platform path separator. If not specified, the classpath will be searched instead.
797.B
798.IP "\-s <dir>"
799The directory where generated source files will be created.
800.B
801.IP "\-XprintProcessorInfo"
802Print information about which annotations and which elements a processor is asked to process
803.B
804.IP "\-XprintRounds"
805Print information about annotation processing rounds
806.B
807.IP "\-classNames <class1[,class2,...]>"
808Qualified names of binary types that need to be processed
809
810.P
811.ul
812Ignored Options (for compatibility with javac options)
813
814.B
815.IP "\-J<option>"
816Pass option to the virtual machine
817.B
818.IP "\-X<option>"
819Specify non-standard option. \-Xemacs is not ignored.
820.B
821.IP "\-X"
822Print non-standard options and exit
823.B
824.IP "\-O"
825Optimize for execution time
826
827.P
828.ul
829Advanced Options
830
831.B
832.IP "@<file>"
833Read command-line arguments from file
834.B
835.IP "\-maxProblems <n>"
836Max number of problems per compilation unit (100 by default)
837.B
838.IP "\-log <filename>"
839Specify a log file in which all output from the compiler will be dumped. This is really useful if you want to debug the batch compiler or get a file which contains all errors and warnings from a batch build. If the extension is .xml, the generated log will be an xml file.
840.B
841.IP "\-genericsignature"
842Explicitly request the compiler to preserve information about generic signature of lambda expressions.
843.B
844.IP "\-Xemacs"
845Use emacs style to present errors and warnings locations into the console and regular text logs. XML logs are unaffected by this option. With this option active, the message:
846.br
847\ \ \ \ 2. WARNING in /workspace/X.java
848.br
849\ \ \ \ (at line 8)...
850.br
851is presented as:
852.br
853\ \ \ \ /workspace/X.java:8: warning: The method...
854.br
855
856.B
857.IP "\-proceedOnError[:Fatal]"
858Keep compiling in spite of errors, dumping class files with problem methods or problem types. This is recommended only if you want to be able to run your application even if you have remaining errors.
859With ":Fatal", all optional errors are treated as fatal and this leads to code that will abort if an error is reached at runtime. Without ":Fatal", optional errors don't prevent the proper code generation and the produced .class files can be run without a problem.
860.B
861.IP "\-verbose"
862Print accessed/processed compilation units in the console or the log file if specified.
863.B
864.IP "\-referenceInfo"
865Compute reference info. This is useful only if connected to the builder. The reference infos are useless otherwise.
866.B
867.IP "\-progress"
868Show progress (only in \-log mode).
869.B
870.IP "\-time"
871Display speed information.
872.B
873.IP "\-noExit"
874Do not call System.exit(n) at end of compilation (n=0 if no error).
875.B
876.IP "\-repeat <n>"
877Repeat compilation process <n> times (perf analysis).
878.B
879.IP "\-inlineJSR"
880Inline JSR bytecode (implicit if target >= 1.5).
881.B
882.IP "\-enableJavadoc"
883Consider references inside Javadoc. The Javadoc options are effective only when this option is enabled.
884.B
885.IP "\-missingNullDefault"
886When annotation based null analysis is enabled (using "nullAnnot", above), this option will raise a warning whenever there is no default annotation on a package or a type.
887.B
888.IP "\-annotationpath"
889When annotation based null analysis is enabled (using "nullAnnot", above), this option defines locations where to find external annotations to support annotation-based null analysis.
890The value of this options is a list of directories or zip files. Entries are separated by the platform path separator.
891The special name CLASSPATH will cause lookup of external annotations from the classpath and sourcepath.
892
893.P
894.ul
895Helping Options
896
897.B
898.IP "\-? \-help"
899Display the help message.
900.B
901.IP "\-v \-version"
902Display the build number of the compiler. This is very useful to report a bug.
903.B
904.IP "\-showversion"
905Display the build number of the compiler and continue. This is very useful to report a bug.
906
907.SH SEE ALSO
908<\fBhttp://help.eclipse.org/topic/org.eclipse.jdt.doc.user/tasks/task-using_batch_compiler.htm\fR>
909.SH BUGS
910To report bugs, use <\fBhttps://bugs.eclipse.org/bugs/enter_bug.cgi?product=JDT&component=Core\fR>
911.SH AUTHOR
912For details on Eclipse committers, see <\fBhttp://www.eclipse.org/committers/\fR>