ecj(1) manual page for eclipse JDT Compiler


ecj <options> <source files>


The JDT Compiler (jdtc) is a command version of Java compiler for eclipse. ecj has basic java compiler options like SUN's javac.

Note: this manual page is out of date; please call the compiler with -help for the current documentation.


-help display a help message
-version compiler version number
-classpath <dir 1>;<dir 2>;...;<dir P>
-d <dir> destination directory (if omitted no package directory structure is created)
-d none
no classfile is generated

-1.3 set compliance level to 1.3

-1.4 set compliance level to 1.4 (default)
-1.5 set compliance level to 1.5
-1.6 set compliance level to 1.6
-1.7 set compliance level to 1.7
-1.8 set compliance level to 1.8
-source <ver> assertions toggle (1.3 or 1.4, default is 1.3 in -1.3 mode and 1.4 in -1.4 mode)
-target <ver> classfile target setting
-nowarn no warning (equivalent to '-warn:none')
-warn: <level> set warning level (e.g. '-warn:unusedLocals,deprecation')
warn method with constructor name
warn attempt to override package-default method
warn usage of deprecated type or member
warn hidden catch block
warn on unused local variable (never read)
warn on unused method argument (never read)
warn on unused imports
warn when performing synthetic access for innerclass
warn occurrence of 'assert' used as identifier

-deprecation equivalent to -warn:deprecation. -g[:<level>] debug attributes level

all debug info ('-g:lines,vars,source')
no debug info
selective debug info

-preserveAllLocals code gen preserve all local variables (for debug purpose)

-noImportError no errors for unresolved imports
-encoding specify default source encoding format (custom encoding can also be specified on a per file basis by suffixing each input source file/folder name with '[encoding]')

-log <filename> specify a log file

-proceedOnError keep compiling when error, dumping class files with problem methods
-verbose print accessed/processed compilation units
-referenceInfo compute reference info
-progress show progress (only in -log mode)
-time display speed information
-noExit do not call System.exit(n) at end of compilation (n=0 if no error)
-repeat <n> repeat compilation process <n> times (perf analysis)


This manual page was written by Takshi Okamoto and Jan Schulz <[email protected]>.