GNU Info

Info Node: (gcj-300.info)Input Options

(gcj-300.info)Input Options


Next: Encodings Prev: Input and output files Up: Invoking gcj
Enter node , (file) or (file)node

Input Options
=============

   `gcj' has options to control where it looks to find files it needs.
For instance, `gcj' might need to load a class that is referenced by
the file it has been asked to compile.  Like other compilers for the
Java language, `gcj' has a notion of a "class path".  There are several
options and environment variables which can be used to manipulate the
class path.  When `gcj' looks for a given class, it searches the class
path looking for matching `.class' or `.java' file.  `gcj' comes with a
built-in class path which points at the installed `libgcj.jar', a file
which contains all the standard classes.

   In the below, a directory or path component can refer either to an
actual directory on the filesystem, or to a `.zip' or `.jar' file,
which `gcj' will search as if it is a directory.

`-IDIR'
     All directories specified by `-I' are kept in order and prepended
     to the class path constructed from all the other options.  Unless
     compatibility with tools like `javac' is imported, we recommend
     always using `-I' instead of the other options for manipulating the
     class path.

`--classpath=PATH'
     This sets the class path to PATH, a colon-separated list of paths
     (on Windows-based systems, a semicolon-separate list of paths).

`--CLASSPATH=PATH'
     This sets the class path to PATH, a colon-separated list of paths
     (on Windows-based systems, a semicolon-separate list of paths).
     This differs from the `--classpath' option in that it also
     suppresses the built-in system path.

`CLASSPATH'
     This is an environment variable which holds a list of paths.

   The final class path is constructed like so:

   * First come all directories specified via `-I'.

   * If `--classpath' is specified, its value is appended and processing
     stops.  That is, `--classpath' suppresses all the options mentioned
     later in this list.

   * If `--CLASSPATH' is specified, its value is appended and the
     `CLASSPATH' environment variable is suppressed.

   * If the `CLASSPATH' environment variable is specified (and was not
     suppressed by `--CLASSPATH'), then its value is appended.

   * Finally, the built-in system directory, `libgcj.jar', is appended.

   The classfile built by `gcj' for the class `java.lang.Object' (and
placed in `libgcj.jar') contains a special zero length attribute
`gnu.gcj.gcj-compiled'. The compiler looks for this attribute when
loading `java.lang.Object' and will report an error if it isn't found,
unless it compiles to bytecode (the option
`-fforce-classes-archive-check' can be used to overide this behavior in
this particular case.)

`-fforce-classes-archive-check'
     This forces the compiler to always check for the special zero
     length attribute `gnu.gcj.gcj-compiled' in `java.lang.Object' and
     issue an error if it isn't found.


automatically generated by info2www version 1.2.2.9