Next: , Up: Invoking gcj

1.1 Input and output files

A gcj command is like a gcc command, in that it consists of a number of options and file names. The following kinds of input file names are supported:
Java source files.
Java bytecode files.
An archive containing one or more .class files, all of which are compiled. The archive may be compressed. Files in an archive which don't end with `.class' are treated as resource files; they are compiled into the resulting object file as `core:' URLs.
A file containing a whitespace-separated list of input file names. (Currently, these must all be .java source files, but that may change.) Each named file is compiled, just as if it had been on the command line.
Libraries to use when linking. See the gcc manual.

You can specify more than one input file on the gcj command line, in which case they will all be compiled. If you specify a -o FILENAME option, all the input files will be compiled together, producing a single output file, named FILENAME. This is allowed even when using -S or -c, but not when using -C or --resource. (This is an extension beyond the what plain gcc allows.) (If more than one input file is specified, all must currently be .java files, though we hope to fix this.)