Jamaicac is a Java bytecode compiler that is based on the Eclipse Java Compiler version 3.1.1 (see Eclipse Public License the Section called Eclipse Public License (EPL) in Appendix I). It uses the system classes of the Jamaica distribution as default bootclasspath.
The command line syntax for the jamaicac is as follows:
jamaicac <options> <source files | directories> |
If directories are specified, then their source contents are compiled. Possible options are listed below. Options enabled by default are prefixed with `+'
The classpath option specifies the location for application classes and sources. The entries in the list are directories, zip files or jar files separated by colons (`:'). Each directory or file can specify access rules for types between `[' and `]' (e.g. "[-X.java]" to deny access to type X).
The bootclasspath option specifies location for system classes. The entries in the list are directories, zip files or jar files separated by colons (`:'). Each directory or file can specify access rules for types between `[' and `]' (e.g. "[-X.java]" to deny access to type X).
The sourcepath option specifies location for application sources. Each directory can specify access rules for types between `[' and `]' (e.g. "[-X.java]" to deny access to type X)
The useTarget option specifies the target platform to compile for. It is used to compute the bootclasspath in case bootclasspath is omitted. By default, the host platform is used.
The extdirs option specifies location for extension zip/jar files.
The d option sets the destination directory to write the generated class files to. If omitted, no directory is created.
With parameter none the d option disables the generation of class files.
The encoding option specifies custom encoding for all sources. Each file/directory can override it when suffixed with `['<enc>`]' (e.g. "X.java[utf8]").
The 1.3 option uses 1.3 compliance level (implicit "-source 1.3 -target 1.1")
The 1.4 option uses 1.4 compliance level (implicit "-source 1.3 -target 1.2")
The 1.5 option use 1.5 compliance level (implicit "-source 1.5 -target 1.5")
The source option sets source level: 1.3 to 1.5 (or 5 or 5.0).
The target option sets classfile target level: 1.1 to 1.5 (or 5 or 5.0)
The deprecation option checks for deprecation outside deprecated code.
The nowarn option disables all warnings. See the Section called Jamaicac warning types for a list of all warnings created by jamaicac.
The warn option enables exactly the listed warnings. See the Section called Jamaicac warning types for a list of all warnings created by jamaicac.
The warn option with `+' enables additional warnings. See the Section called Jamaicac warning types for a list of all warnings created by jamaicac.
The warn option with `-' disables specific warnings. See the Section called Jamaicac warning types for a list of all warnings created by jamaicac.
Table 4-1. Warnings created by jamaicac
| warning option | meaning |
|---|---|
| allDeprecation | deprecation including inside deprecated code |
| allJavadoc | invalid or missing javadoc |
| assertIdentifier + | assert used as identifier |
| boxing | autoboxing conversion |
| charConcat + | char[] in String concat |
| conditionAssign | possible accidental boolean assignment |
| constructorName + | method with constructor name |
| dep-ann | missing @Deprecated annotation |
| deprecation + | deprecation outside deprecated code |
| emptyBlock | undocumented empty block |
| enumSwitch | incomplete enum switch |
| fieldHiding | field hiding another variable |
| finalBound | type parameter with final bound |
| finally + | finally block not completing normally |
| hiding | macro for fieldHiding, localHiding, typeHiding and maskedCatchBlock |
| incomplete-switch | same as enumSwitch |
| indirectStatic | indirect reference to static member |
| intfAnnotation + | annotation type used as super interface |
| intfNonInherited + | interface non-inherited method compatibility |
| javadoc | invalid javadoc |
| localHiding | local variable hiding another variable |
| maskedCatchBlock + | hidden catch block |
| nls | string literal lacking non-nls tag //$NON-NLS<n>$ |
| noEffectAssign + | assignment without effect |
| null | missing or redundant null check |
| over-ann | missing @Override annotation |
| pkgDefaultMethod + | attempt to override package-default method |
| semicolon | unnecessary semicolon, empty statement |
| serial + | missing serialVersionUID |
| specialParamHiding | constructor or setter parameter hiding another field |
| static-access | macro for indirectStatic and staticReceiver |
| staticReceiver + | non-static reference to static member |
| suppress + | enable @SuppressWarnings |
| synthetic-access | same as syntheticAccess |
| syntheticAccess | synthetic access for innerclass |
| tasks(<tags separated by |>) | tasks identified by tags inside comments |
| typeHiding + | type parameter hiding another type |
| unchecked + | unchecked type operation |
| unnecessaryElse | unnecessary else clause |
| unqualified-field- access | same as unQualifiedField |
| unqualifiedField | unqualified reference to field |
| unused | macro for unusedArgument, unusedImport, unusedLocal, unusedPrivate and unusedThrown |
| unusedArgument | unread method parameter |
| unusedImport + | unused import declaration |
| unusedLocal + | unread local variable |
| unusedPrivate + | unused private member declaration |
| unusedThrown | unused declared thrown exception |
| uselessTypeCheck | unnecessary cast/instanceof operation |
| varargsCast + | varargs argument need explicit cast |
| warningToken + | unhandled warning token in @SuppressWarnings |
The g option customs debug info.
The g option sets both lines table and source debug info.
The g option without parameter activates all debug info.
The g option with none disables debug info.
The preserveAllLocals option preserves unused local vars for debug purpose.
A J<option> option passes an option to virtual machine (ignored).
The J<option> option specifies a non-standard option (ignored).
The X option prints non-standard options and exits (ignored).
The X option optimizes for execution time (ignored).