René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

javac, the java compiler

Command Line Options

-g

Specifies amount of generated debug information. Possible values: -g (full information), -g:none (no information), -g:lines, -g:vars and -g:source.

-nowarn

Don't show warnings.

-verbose

Prints in more detail what the compiler is doing.

-deprectation

Displays each use or override of a deprecated member or class.

-classpath

Location of user class files.

-sourcepath

Location where .java files are found.

-bootclasspath

Overrides location of bootstrap class files.

-extdirs

Overrides location of installed class files.

-d

Specifies where generated .class files go.

-encoding

Specifies the encoding of the source file. Possible value for example: EUCJIS/SJIS.

-source

Source compatibility with indicated release.

-target

Generate class files for the indicated Virtual Machine version.
javac -target 1.1 XYZ.java
The Java 2 SDK allows three targets: 1.1, 1.2, 1.3

-help

Prints an overview of available options with javac:
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs are used
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -source <release>         Provide source compatibility with specified release
  -target <release>         Generate class files for specific VM version
  -help                     Print a synopsis of standard options

Links

Jikes is an Open Source Java compiler.