.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
|
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
|
.\"
|
.\"
|
.\" Standard preamble:
|
.\" Standard preamble:
|
.\" ========================================================================
|
.\" ========================================================================
|
.de Sh \" Subsection heading
|
.de Sh \" Subsection heading
|
.br
|
.br
|
.if t .Sp
|
.if t .Sp
|
.ne 5
|
.ne 5
|
.PP
|
.PP
|
\fB\\$1\fR
|
\fB\\$1\fR
|
.PP
|
.PP
|
..
|
..
|
.de Sp \" Vertical space (when we can't use .PP)
|
.de Sp \" Vertical space (when we can't use .PP)
|
.if t .sp .5v
|
.if t .sp .5v
|
.if n .sp
|
.if n .sp
|
..
|
..
|
.de Vb \" Begin verbatim text
|
.de Vb \" Begin verbatim text
|
.ft CW
|
.ft CW
|
.nf
|
.nf
|
.ne \\$1
|
.ne \\$1
|
..
|
..
|
.de Ve \" End verbatim text
|
.de Ve \" End verbatim text
|
.ft R
|
.ft R
|
.fi
|
.fi
|
..
|
..
|
.\" Set up some character translations and predefined strings. \*(-- will
|
.\" Set up some character translations and predefined strings. \*(-- will
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
.\" double quote, and \*(R" will give a right double quote. | will give a
|
.\" double quote, and \*(R" will give a right double quote. | will give a
|
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
|
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
|
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
|
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
|
.\" expand to `' in nroff, nothing in troff, for use with C<>.
|
.\" expand to `' in nroff, nothing in troff, for use with C<>.
|
.tr \(*W-|\(bv\*(Tr
|
.tr \(*W-|\(bv\*(Tr
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
.ie n \{\
|
.ie n \{\
|
. ds -- \(*W-
|
. ds -- \(*W-
|
. ds PI pi
|
. ds PI pi
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
. ds L" ""
|
. ds L" ""
|
. ds R" ""
|
. ds R" ""
|
. ds C` ""
|
. ds C` ""
|
. ds C' ""
|
. ds C' ""
|
'br\}
|
'br\}
|
.el\{\
|
.el\{\
|
. ds -- \|\(em\|
|
. ds -- \|\(em\|
|
. ds PI \(*p
|
. ds PI \(*p
|
. ds L" ``
|
. ds L" ``
|
. ds R" ''
|
. ds R" ''
|
'br\}
|
'br\}
|
.\"
|
.\"
|
.\" If the F register is turned on, we'll generate index entries on stderr for
|
.\" If the F register is turned on, we'll generate index entries on stderr for
|
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
|
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
.\" output yourself in some meaningful fashion.
|
.\" output yourself in some meaningful fashion.
|
.if \nF \{\
|
.if \nF \{\
|
. de IX
|
. de IX
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
..
|
..
|
. nr % 0
|
. nr % 0
|
. rr F
|
. rr F
|
.\}
|
.\}
|
.\"
|
.\"
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
.\" way too many mistakes in technical documents.
|
.\" way too many mistakes in technical documents.
|
.hy 0
|
.hy 0
|
.if n .na
|
.if n .na
|
.\"
|
.\"
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
. \" fudge factors for nroff and troff
|
. \" fudge factors for nroff and troff
|
.if n \{\
|
.if n \{\
|
. ds #H 0
|
. ds #H 0
|
. ds #V .8m
|
. ds #V .8m
|
. ds #F .3m
|
. ds #F .3m
|
. ds #[ \f1
|
. ds #[ \f1
|
. ds #] \fP
|
. ds #] \fP
|
.\}
|
.\}
|
.if t \{\
|
.if t \{\
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
. ds #V .6m
|
. ds #V .6m
|
. ds #F 0
|
. ds #F 0
|
. ds #[ \&
|
. ds #[ \&
|
. ds #] \&
|
. ds #] \&
|
.\}
|
.\}
|
. \" simple accents for nroff and troff
|
. \" simple accents for nroff and troff
|
.if n \{\
|
.if n \{\
|
. ds ' \&
|
. ds ' \&
|
. ds ` \&
|
. ds ` \&
|
. ds ^ \&
|
. ds ^ \&
|
. ds , \&
|
. ds , \&
|
. ds ~ ~
|
. ds ~ ~
|
. ds /
|
. ds /
|
.\}
|
.\}
|
.if t \{\
|
.if t \{\
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
.\}
|
.\}
|
. \" troff and (daisy-wheel) nroff accents
|
. \" troff and (daisy-wheel) nroff accents
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
. \" corrections for vroff
|
. \" corrections for vroff
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
. \" for low resolution devices (crt and lpr)
|
. \" for low resolution devices (crt and lpr)
|
.if \n(.H>23 .if \n(.V>19 \
|
.if \n(.H>23 .if \n(.V>19 \
|
\{\
|
\{\
|
. ds : e
|
. ds : e
|
. ds 8 ss
|
. ds 8 ss
|
. ds o a
|
. ds o a
|
. ds d- d\h'-1'\(ga
|
. ds d- d\h'-1'\(ga
|
. ds D- D\h'-1'\(hy
|
. ds D- D\h'-1'\(hy
|
. ds th \o'bp'
|
. ds th \o'bp'
|
. ds Th \o'LP'
|
. ds Th \o'LP'
|
. ds ae ae
|
. ds ae ae
|
. ds Ae AE
|
. ds Ae AE
|
.\}
|
.\}
|
.rm #[ #] #H #V #F C
|
.rm #[ #] #H #V #F C
|
.\" ========================================================================
|
.\" ========================================================================
|
.\"
|
.\"
|
.IX Title "GCJ 1"
|
.IX Title "GCJ 1"
|
.TH GCJ 1 "2007-10-07" "gcc-4.2.2" "GNU"
|
.TH GCJ 1 "2007-10-07" "gcc-4.2.2" "GNU"
|
.SH "NAME"
|
.SH "NAME"
|
gcj \- Ahead\-of\-time compiler for the Java language
|
gcj \- Ahead\-of\-time compiler for the Java language
|
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
.IX Header "SYNOPSIS"
|
.IX Header "SYNOPSIS"
|
gcj [\fB\-I\fR\fIdir\fR...] [\fB\-d\fR \fIdir\fR...]
|
gcj [\fB\-I\fR\fIdir\fR...] [\fB\-d\fR \fIdir\fR...]
|
[\fB\-\-CLASSPATH\fR=\fIpath\fR] [\fB\-\-classpath\fR=\fIpath\fR]
|
[\fB\-\-CLASSPATH\fR=\fIpath\fR] [\fB\-\-classpath\fR=\fIpath\fR]
|
[\fB\-f\fR\fIoption\fR...] [\fB\-\-encoding\fR=\fIname\fR]
|
[\fB\-f\fR\fIoption\fR...] [\fB\-\-encoding\fR=\fIname\fR]
|
[\fB\-\-main\fR=\fIclassname\fR] [\fB\-D\fR\fIname\fR[=\fIvalue\fR]...]
|
[\fB\-\-main\fR=\fIclassname\fR] [\fB\-D\fR\fIname\fR[=\fIvalue\fR]...]
|
[\fB\-C\fR] [\fB\-\-resource\fR \fIresource-name\fR] [\fB\-d\fR \fIdirectory\fR]
|
[\fB\-C\fR] [\fB\-\-resource\fR \fIresource-name\fR] [\fB\-d\fR \fIdirectory\fR]
|
[\fB\-W\fR\fIwarn\fR...]
|
[\fB\-W\fR\fIwarn\fR...]
|
\fIsourcefile\fR...
|
\fIsourcefile\fR...
|
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
.IX Header "DESCRIPTION"
|
.IX Header "DESCRIPTION"
|
As \fBgcj\fR is just another front end to \fBgcc\fR, it supports many
|
As \fBgcj\fR is just another front end to \fBgcc\fR, it supports many
|
of the same options as gcc. This manual only documents the
|
of the same options as gcc. This manual only documents the
|
options specific to \fBgcj\fR.
|
options specific to \fBgcj\fR.
|
.SH "OPTIONS"
|
.SH "OPTIONS"
|
.IX Header "OPTIONS"
|
.IX Header "OPTIONS"
|
.Sh "Input and output files"
|
.Sh "Input and output files"
|
.IX Subsection "Input and output files"
|
.IX Subsection "Input and output files"
|
A \fBgcj\fR command is like a \fBgcc\fR command, in that it
|
A \fBgcj\fR command is like a \fBgcc\fR command, in that it
|
consists of a number of options and file names. The following kinds
|
consists of a number of options and file names. The following kinds
|
of input file names are supported:
|
of input file names are supported:
|
.IP "\fIfile\fR\fB.java\fR" 4
|
.IP "\fIfile\fR\fB.java\fR" 4
|
.IX Item "file.java"
|
.IX Item "file.java"
|
Java source files.
|
Java source files.
|
.IP "\fIfile\fR\fB.class\fR" 4
|
.IP "\fIfile\fR\fB.class\fR" 4
|
.IX Item "file.class"
|
.IX Item "file.class"
|
Java bytecode files.
|
Java bytecode files.
|
.IP "\fIfile\fR\fB.zip\fR" 4
|
.IP "\fIfile\fR\fB.zip\fR" 4
|
.IX Item "file.zip"
|
.IX Item "file.zip"
|
.PD 0
|
.PD 0
|
.IP "\fIfile\fR\fB.jar\fR" 4
|
.IP "\fIfile\fR\fB.jar\fR" 4
|
.IX Item "file.jar"
|
.IX Item "file.jar"
|
.PD
|
.PD
|
An archive containing one or more \f(CW\*(C`.class\*(C'\fR files, all of
|
An archive containing one or more \f(CW\*(C`.class\*(C'\fR files, all of
|
which are compiled. The archive may be compressed. Files in
|
which are compiled. The archive may be compressed. Files in
|
an archive which don't end with \fB.class\fR are treated as
|
an archive which don't end with \fB.class\fR are treated as
|
resource files; they are compiled into the resulting object file
|
resource files; they are compiled into the resulting object file
|
as \fBcore:\fR URLs.
|
as \fBcore:\fR URLs.
|
.IP "\fB@\fR\fIfile\fR" 4
|
.IP "\fB@\fR\fIfile\fR" 4
|
.IX Item "@file"
|
.IX Item "@file"
|
A file containing a whitespace-separated list of input file names.
|
A file containing a whitespace-separated list of input file names.
|
(Currently, these must all be \f(CW\*(C`.java\*(C'\fR source files, but that
|
(Currently, these must all be \f(CW\*(C`.java\*(C'\fR source files, but that
|
may change.)
|
may change.)
|
Each named file is compiled, just as if it had been on the command line.
|
Each named file is compiled, just as if it had been on the command line.
|
.IP "\fIlibrary\fR\fB.a\fR" 4
|
.IP "\fIlibrary\fR\fB.a\fR" 4
|
.IX Item "library.a"
|
.IX Item "library.a"
|
.PD 0
|
.PD 0
|
.IP "\fIlibrary\fR\fB.so\fR" 4
|
.IP "\fIlibrary\fR\fB.so\fR" 4
|
.IX Item "library.so"
|
.IX Item "library.so"
|
.IP "\fB\-l\fR\fIlibname\fR" 4
|
.IP "\fB\-l\fR\fIlibname\fR" 4
|
.IX Item "-llibname"
|
.IX Item "-llibname"
|
.PD
|
.PD
|
Libraries to use when linking. See the \fBgcc\fR manual.
|
Libraries to use when linking. See the \fBgcc\fR manual.
|
.PP
|
.PP
|
You can specify more than one input file on the \fBgcj\fR command line,
|
You can specify more than one input file on the \fBgcj\fR command line,
|
in which case they will all be compiled. If you specify a
|
in which case they will all be compiled. If you specify a
|
\&\f(CW\*(C`\-o \f(CI\s-1FILENAME\s0\f(CW\*(C'\fR
|
\&\f(CW\*(C`\-o \f(CI\s-1FILENAME\s0\f(CW\*(C'\fR
|
option, all the input files will be compiled together, producing a
|
option, all the input files will be compiled together, producing a
|
single output file, named \fI\s-1FILENAME\s0\fR.
|
single output file, named \fI\s-1FILENAME\s0\fR.
|
This is allowed even when using \f(CW\*(C`\-S\*(C'\fR or \f(CW\*(C`\-c\*(C'\fR,
|
This is allowed even when using \f(CW\*(C`\-S\*(C'\fR or \f(CW\*(C`\-c\*(C'\fR,
|
but not when using \f(CW\*(C`\-C\*(C'\fR or \f(CW\*(C`\-\-resource\*(C'\fR.
|
but not when using \f(CW\*(C`\-C\*(C'\fR or \f(CW\*(C`\-\-resource\*(C'\fR.
|
(This is an extension beyond the what plain \fBgcc\fR allows.)
|
(This is an extension beyond the what plain \fBgcc\fR allows.)
|
(If more than one input file is specified, all must currently
|
(If more than one input file is specified, all must currently
|
be \f(CW\*(C`.java\*(C'\fR files, though we hope to fix this.)
|
be \f(CW\*(C`.java\*(C'\fR files, though we hope to fix this.)
|
.Sh "Input Options"
|
.Sh "Input Options"
|
.IX Subsection "Input Options"
|
.IX Subsection "Input Options"
|
\&\fBgcj\fR has options to control where it looks to find files it needs.
|
\&\fBgcj\fR has options to control where it looks to find files it needs.
|
For instance, \fBgcj\fR might need to load a class that is referenced
|
For instance, \fBgcj\fR might need to load a class that is referenced
|
by the file it has been asked to compile. Like other compilers for the
|
by the file it has been asked to compile. Like other compilers for the
|
Java language, \fBgcj\fR has a notion of a \fIclass path\fR. There are
|
Java language, \fBgcj\fR has a notion of a \fIclass path\fR. There are
|
several options and environment variables which can be used to
|
several options and environment variables which can be used to
|
manipulate the class path. When \fBgcj\fR looks for a given class, it
|
manipulate the class path. When \fBgcj\fR looks for a given class, it
|
searches the class path looking for matching \fI.class\fR or
|
searches the class path looking for matching \fI.class\fR or
|
\&\fI.java\fR file. \fBgcj\fR comes with a built-in class path which
|
\&\fI.java\fR file. \fBgcj\fR comes with a built-in class path which
|
points at the installed \fIlibgcj.jar\fR, a file which contains all the
|
points at the installed \fIlibgcj.jar\fR, a file which contains all the
|
standard classes.
|
standard classes.
|
.PP
|
.PP
|
In the below, a directory or path component can refer either to an
|
In the below, a directory or path component can refer either to an
|
actual directory on the filesystem, or to a \fI.zip\fR or \fI.jar\fR
|
actual directory on the filesystem, or to a \fI.zip\fR or \fI.jar\fR
|
file, which \fBgcj\fR will search as if it is a directory.
|
file, which \fBgcj\fR will search as if it is a directory.
|
.IP "\fB\-I\fR\fIdir\fR" 4
|
.IP "\fB\-I\fR\fIdir\fR" 4
|
.IX Item "-Idir"
|
.IX Item "-Idir"
|
All directories specified by \f(CW\*(C`\-I\*(C'\fR are kept in order and prepended
|
All directories specified by \f(CW\*(C`\-I\*(C'\fR are kept in order and prepended
|
to the class path constructed from all the other options. Unless
|
to the class path constructed from all the other options. Unless
|
compatibility with tools like \f(CW\*(C`javac\*(C'\fR is important, we recommend
|
compatibility with tools like \f(CW\*(C`javac\*(C'\fR is important, we recommend
|
always using \f(CW\*(C`\-I\*(C'\fR instead of the other options for manipulating the
|
always using \f(CW\*(C`\-I\*(C'\fR instead of the other options for manipulating the
|
class path.
|
class path.
|
.IP "\fB\-\-classpath=\fR\fIpath\fR" 4
|
.IP "\fB\-\-classpath=\fR\fIpath\fR" 4
|
.IX Item "--classpath=path"
|
.IX Item "--classpath=path"
|
This sets the class path to \fIpath\fR, a colon-separated list of paths
|
This sets the class path to \fIpath\fR, a colon-separated list of paths
|
(on Windows-based systems, a semicolon-separate list of paths).
|
(on Windows-based systems, a semicolon-separate list of paths).
|
This does not override the builtin (\*(L"boot\*(R") search path.
|
This does not override the builtin (\*(L"boot\*(R") search path.
|
.IP "\fB\-\-CLASSPATH=\fR\fIpath\fR" 4
|
.IP "\fB\-\-CLASSPATH=\fR\fIpath\fR" 4
|
.IX Item "--CLASSPATH=path"
|
.IX Item "--CLASSPATH=path"
|
Deprecated synonym for \f(CW\*(C`\-\-classpath\*(C'\fR.
|
Deprecated synonym for \f(CW\*(C`\-\-classpath\*(C'\fR.
|
.IP "\fB\-\-bootclasspath=\fR\fIpath\fR" 4
|
.IP "\fB\-\-bootclasspath=\fR\fIpath\fR" 4
|
.IX Item "--bootclasspath=path"
|
.IX Item "--bootclasspath=path"
|
Where to find the standard builtin classes, such as \f(CW\*(C`java.lang.String\*(C'\fR.
|
Where to find the standard builtin classes, such as \f(CW\*(C`java.lang.String\*(C'\fR.
|
.IP "\fB\-\-extdirs=\fR\fIpath\fR" 4
|
.IP "\fB\-\-extdirs=\fR\fIpath\fR" 4
|
.IX Item "--extdirs=path"
|
.IX Item "--extdirs=path"
|
For each directory in the \fIpath\fR, place the contents of that
|
For each directory in the \fIpath\fR, place the contents of that
|
directory at the end of the class path.
|
directory at the end of the class path.
|
.IP "\fB\s-1CLASSPATH\s0\fR" 4
|
.IP "\fB\s-1CLASSPATH\s0\fR" 4
|
.IX Item "CLASSPATH"
|
.IX Item "CLASSPATH"
|
This is an environment variable which holds a list of paths.
|
This is an environment variable which holds a list of paths.
|
.PP
|
.PP
|
The final class path is constructed like so:
|
The final class path is constructed like so:
|
.IP "\(bu" 4
|
.IP "\(bu" 4
|
First come all directories specified via \f(CW\*(C`\-I\*(C'\fR.
|
First come all directories specified via \f(CW\*(C`\-I\*(C'\fR.
|
.IP "\(bu" 4
|
.IP "\(bu" 4
|
If \fB\-\-classpath\fR is specified, its value is appended.
|
If \fB\-\-classpath\fR is specified, its value is appended.
|
Otherwise, if the \f(CW\*(C`CLASSPATH\*(C'\fR environment variable is specified,
|
Otherwise, if the \f(CW\*(C`CLASSPATH\*(C'\fR environment variable is specified,
|
then its value is appended.
|
then its value is appended.
|
Otherwise, the current directory (\f(CW"."\fR) is appended.
|
Otherwise, the current directory (\f(CW"."\fR) is appended.
|
.IP "\(bu" 4
|
.IP "\(bu" 4
|
If \f(CW\*(C`\-\-bootclasspath\*(C'\fR was specified, append its value.
|
If \f(CW\*(C`\-\-bootclasspath\*(C'\fR was specified, append its value.
|
Otherwise, append the built-in system directory, \fIlibgcj.jar\fR.
|
Otherwise, append the built-in system directory, \fIlibgcj.jar\fR.
|
.IP "\(bu" 4
|
.IP "\(bu" 4
|
Finally, if \f(CW\*(C`\-\-extdirs\*(C'\fR was specified, append the contents of the
|
Finally, if \f(CW\*(C`\-\-extdirs\*(C'\fR was specified, append the contents of the
|
specified directories at the end of the class path. Otherwise, append
|
specified directories at the end of the class path. Otherwise, append
|
the contents of the built-in extdirs at \f(CW\*(C`$(prefix)/share/java/ext\*(C'\fR.
|
the contents of the built-in extdirs at \f(CW\*(C`$(prefix)/share/java/ext\*(C'\fR.
|
.PP
|
.PP
|
The classfile built by \fBgcj\fR for the class \f(CW\*(C`java.lang.Object\*(C'\fR
|
The classfile built by \fBgcj\fR for the class \f(CW\*(C`java.lang.Object\*(C'\fR
|
(and placed in \f(CW\*(C`libgcj.jar\*(C'\fR) contains a special zero length
|
(and placed in \f(CW\*(C`libgcj.jar\*(C'\fR) contains a special zero length
|
attribute \f(CW\*(C`gnu.gcj.gcj\-compiled\*(C'\fR. The compiler looks for this
|
attribute \f(CW\*(C`gnu.gcj.gcj\-compiled\*(C'\fR. The compiler looks for this
|
attribute when loading \f(CW\*(C`java.lang.Object\*(C'\fR and will report an error
|
attribute when loading \f(CW\*(C`java.lang.Object\*(C'\fR and will report an error
|
if it isn't found, unless it compiles to bytecode (the option
|
if it isn't found, unless it compiles to bytecode (the option
|
\&\f(CW\*(C`\-fforce\-classes\-archive\-check\*(C'\fR can be used to override this
|
\&\f(CW\*(C`\-fforce\-classes\-archive\-check\*(C'\fR can be used to override this
|
behavior in this particular case.)
|
behavior in this particular case.)
|
.IP "\fB\-fforce\-classes\-archive\-check\fR" 4
|
.IP "\fB\-fforce\-classes\-archive\-check\fR" 4
|
.IX Item "-fforce-classes-archive-check"
|
.IX Item "-fforce-classes-archive-check"
|
This forces the compiler to always check for the special zero length
|
This forces the compiler to always check for the special zero length
|
attribute \f(CW\*(C`gnu.gcj.gcj\-compiled\*(C'\fR in \f(CW\*(C`java.lang.Object\*(C'\fR and
|
attribute \f(CW\*(C`gnu.gcj.gcj\-compiled\*(C'\fR in \f(CW\*(C`java.lang.Object\*(C'\fR and
|
issue an error if it isn't found.
|
issue an error if it isn't found.
|
.Sh "Encodings"
|
.Sh "Encodings"
|
.IX Subsection "Encodings"
|
.IX Subsection "Encodings"
|
The Java programming language uses Unicode throughout. In an effort to
|
The Java programming language uses Unicode throughout. In an effort to
|
integrate well with other locales, \fBgcj\fR allows \fI.java\fR files
|
integrate well with other locales, \fBgcj\fR allows \fI.java\fR files
|
to be written using almost any encoding. \fBgcj\fR knows how to
|
to be written using almost any encoding. \fBgcj\fR knows how to
|
convert these encodings into its internal encoding at compile time.
|
convert these encodings into its internal encoding at compile time.
|
.PP
|
.PP
|
You can use the \f(CW\*(C`\-\-encoding=\f(CI\s-1NAME\s0\f(CW\*(C'\fR option to specify an
|
You can use the \f(CW\*(C`\-\-encoding=\f(CI\s-1NAME\s0\f(CW\*(C'\fR option to specify an
|
encoding (of a particular character set) to use for source files. If
|
encoding (of a particular character set) to use for source files. If
|
this is not specified, the default encoding comes from your current
|
this is not specified, the default encoding comes from your current
|
locale. If your host system has insufficient locale support, then
|
locale. If your host system has insufficient locale support, then
|
\&\fBgcj\fR assumes the default encoding to be the \fB\s-1UTF\-8\s0\fR encoding
|
\&\fBgcj\fR assumes the default encoding to be the \fB\s-1UTF\-8\s0\fR encoding
|
of Unicode.
|
of Unicode.
|
.PP
|
.PP
|
To implement \f(CW\*(C`\-\-encoding\*(C'\fR, \fBgcj\fR simply uses the host
|
To implement \f(CW\*(C`\-\-encoding\*(C'\fR, \fBgcj\fR simply uses the host
|
platform's \f(CW\*(C`iconv\*(C'\fR conversion routine. This means that in practice
|
platform's \f(CW\*(C`iconv\*(C'\fR conversion routine. This means that in practice
|
\&\fBgcj\fR is limited by the capabilities of the host platform.
|
\&\fBgcj\fR is limited by the capabilities of the host platform.
|
.PP
|
.PP
|
The names allowed for the argument \f(CW\*(C`\-\-encoding\*(C'\fR vary from platform
|
The names allowed for the argument \f(CW\*(C`\-\-encoding\*(C'\fR vary from platform
|
to platform (since they are not standardized anywhere). However,
|
to platform (since they are not standardized anywhere). However,
|
\&\fBgcj\fR implements the encoding named \fB\s-1UTF\-8\s0\fR internally, so if
|
\&\fBgcj\fR implements the encoding named \fB\s-1UTF\-8\s0\fR internally, so if
|
you choose to use this for your source files you can be assured that it
|
you choose to use this for your source files you can be assured that it
|
will work on every host.
|
will work on every host.
|
.Sh "Warnings"
|
.Sh "Warnings"
|
.IX Subsection "Warnings"
|
.IX Subsection "Warnings"
|
\&\fBgcj\fR implements several warnings. As with other generic
|
\&\fBgcj\fR implements several warnings. As with other generic
|
\&\fBgcc\fR warnings, if an option of the form \f(CW\*(C`\-Wfoo\*(C'\fR enables a
|
\&\fBgcc\fR warnings, if an option of the form \f(CW\*(C`\-Wfoo\*(C'\fR enables a
|
warning, then \f(CW\*(C`\-Wno\-foo\*(C'\fR will disable it. Here we've chosen to
|
warning, then \f(CW\*(C`\-Wno\-foo\*(C'\fR will disable it. Here we've chosen to
|
document the form of the warning which will have an effect \*(-- the
|
document the form of the warning which will have an effect \*(-- the
|
default being the opposite of what is listed.
|
default being the opposite of what is listed.
|
.IP "\fB\-Wredundant\-modifiers\fR" 4
|
.IP "\fB\-Wredundant\-modifiers\fR" 4
|
.IX Item "-Wredundant-modifiers"
|
.IX Item "-Wredundant-modifiers"
|
With this flag, \fBgcj\fR will warn about redundant modifiers. For
|
With this flag, \fBgcj\fR will warn about redundant modifiers. For
|
instance, it will warn if an interface method is declared \f(CW\*(C`public\*(C'\fR.
|
instance, it will warn if an interface method is declared \f(CW\*(C`public\*(C'\fR.
|
.IP "\fB\-Wextraneous\-semicolon\fR" 4
|
.IP "\fB\-Wextraneous\-semicolon\fR" 4
|
.IX Item "-Wextraneous-semicolon"
|
.IX Item "-Wextraneous-semicolon"
|
This causes \fBgcj\fR to warn about empty statements. Empty statements
|
This causes \fBgcj\fR to warn about empty statements. Empty statements
|
have been deprecated.
|
have been deprecated.
|
.IP "\fB\-Wno\-out\-of\-date\fR" 4
|
.IP "\fB\-Wno\-out\-of\-date\fR" 4
|
.IX Item "-Wno-out-of-date"
|
.IX Item "-Wno-out-of-date"
|
This option will cause \fBgcj\fR not to warn when a source file is
|
This option will cause \fBgcj\fR not to warn when a source file is
|
newer than its matching class file. By default \fBgcj\fR will warn
|
newer than its matching class file. By default \fBgcj\fR will warn
|
about this.
|
about this.
|
.IP "\fB\-Wno\-deprecated\fR" 4
|
.IP "\fB\-Wno\-deprecated\fR" 4
|
.IX Item "-Wno-deprecated"
|
.IX Item "-Wno-deprecated"
|
Warn if a deprecated class, method, or field is referred to.
|
Warn if a deprecated class, method, or field is referred to.
|
.IP "\fB\-Wunused\fR" 4
|
.IP "\fB\-Wunused\fR" 4
|
.IX Item "-Wunused"
|
.IX Item "-Wunused"
|
This is the same as \fBgcc\fR's \f(CW\*(C`\-Wunused\*(C'\fR.
|
This is the same as \fBgcc\fR's \f(CW\*(C`\-Wunused\*(C'\fR.
|
.IP "\fB\-Wall\fR" 4
|
.IP "\fB\-Wall\fR" 4
|
.IX Item "-Wall"
|
.IX Item "-Wall"
|
This is the same as \f(CW\*(C`\-Wredundant\-modifiers \-Wextraneous\-semicolon
|
This is the same as \f(CW\*(C`\-Wredundant\-modifiers \-Wextraneous\-semicolon
|
\&\-Wunused\*(C'\fR.
|
\&\-Wunused\*(C'\fR.
|
.Sh "Linking"
|
.Sh "Linking"
|
.IX Subsection "Linking"
|
.IX Subsection "Linking"
|
To turn a Java application into an executable program,
|
To turn a Java application into an executable program,
|
you need to link it with the needed libraries, just as for C or \*(C+.
|
you need to link it with the needed libraries, just as for C or \*(C+.
|
The linker by default looks for a global function named \f(CW\*(C`main\*(C'\fR.
|
The linker by default looks for a global function named \f(CW\*(C`main\*(C'\fR.
|
Since Java does not have global functions, and a
|
Since Java does not have global functions, and a
|
collection of Java classes may have more than one class with a
|
collection of Java classes may have more than one class with a
|
\&\f(CW\*(C`main\*(C'\fR method, you need to let the linker know which of those
|
\&\f(CW\*(C`main\*(C'\fR method, you need to let the linker know which of those
|
\&\f(CW\*(C`main\*(C'\fR methods it should invoke when starting the application.
|
\&\f(CW\*(C`main\*(C'\fR methods it should invoke when starting the application.
|
You can do that in any of these ways:
|
You can do that in any of these ways:
|
.IP "\(bu" 4
|
.IP "\(bu" 4
|
Specify the class containing the desired \f(CW\*(C`main\*(C'\fR method
|
Specify the class containing the desired \f(CW\*(C`main\*(C'\fR method
|
when you link the application, using the \f(CW\*(C`\-\-main\*(C'\fR flag,
|
when you link the application, using the \f(CW\*(C`\-\-main\*(C'\fR flag,
|
described below.
|
described below.
|
.IP "\(bu" 4
|
.IP "\(bu" 4
|
Link the Java package(s) into a shared library (dll) rather than an
|
Link the Java package(s) into a shared library (dll) rather than an
|
executable. Then invoke the application using the \f(CW\*(C`gij\*(C'\fR program,
|
executable. Then invoke the application using the \f(CW\*(C`gij\*(C'\fR program,
|
making sure that \f(CW\*(C`gij\*(C'\fR can find the libraries it needs.
|
making sure that \f(CW\*(C`gij\*(C'\fR can find the libraries it needs.
|
.IP "\(bu" 4
|
.IP "\(bu" 4
|
Link the Java packages(s) with the flag \f(CW\*(C`\-lgij\*(C'\fR, which links
|
Link the Java packages(s) with the flag \f(CW\*(C`\-lgij\*(C'\fR, which links
|
in the \f(CW\*(C`main\*(C'\fR routine from the \f(CW\*(C`gij\*(C'\fR command.
|
in the \f(CW\*(C`main\*(C'\fR routine from the \f(CW\*(C`gij\*(C'\fR command.
|
This allows you to select the class whose \f(CW\*(C`main\*(C'\fR method you
|
This allows you to select the class whose \f(CW\*(C`main\*(C'\fR method you
|
want to run when you run the application. You can also use
|
want to run when you run the application. You can also use
|
other \f(CW\*(C`gij\*(C'\fR flags, such as \f(CW\*(C`\-D\*(C'\fR flags to set properties.
|
other \f(CW\*(C`gij\*(C'\fR flags, such as \f(CW\*(C`\-D\*(C'\fR flags to set properties.
|
Using the \f(CW\*(C`\-lgij\*(C'\fR library (rather than the \f(CW\*(C`gij\*(C'\fR program
|
Using the \f(CW\*(C`\-lgij\*(C'\fR library (rather than the \f(CW\*(C`gij\*(C'\fR program
|
of the previous mechanism) has some advantages: it is compatible with
|
of the previous mechanism) has some advantages: it is compatible with
|
static linking, and does not require configuring or installing libraries.
|
static linking, and does not require configuring or installing libraries.
|
.PP
|
.PP
|
These \f(CW\*(C`gij\*(C'\fR options relate to linking an executable:
|
These \f(CW\*(C`gij\*(C'\fR options relate to linking an executable:
|
.IP "\fB\-\-main=\fR\fI\s-1CLASSNAME\s0\fR" 4
|
.IP "\fB\-\-main=\fR\fI\s-1CLASSNAME\s0\fR" 4
|
.IX Item "--main=CLASSNAME"
|
.IX Item "--main=CLASSNAME"
|
This option is used when linking to specify the name of the class whose
|
This option is used when linking to specify the name of the class whose
|
\&\f(CW\*(C`main\*(C'\fR method should be invoked when the resulting executable is
|
\&\f(CW\*(C`main\*(C'\fR method should be invoked when the resulting executable is
|
run.
|
run.
|
.IP "\fB\-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR" 4
|
.IP "\fB\-D\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR" 4
|
.IX Item "-Dname[=value]"
|
.IX Item "-Dname[=value]"
|
This option can only be used with \f(CW\*(C`\-\-main\*(C'\fR. It defines a system
|
This option can only be used with \f(CW\*(C`\-\-main\*(C'\fR. It defines a system
|
property named \fIname\fR with value \fIvalue\fR. If \fIvalue\fR is not
|
property named \fIname\fR with value \fIvalue\fR. If \fIvalue\fR is not
|
specified then it defaults to the empty string. These system properties
|
specified then it defaults to the empty string. These system properties
|
are initialized at the program's startup and can be retrieved at runtime
|
are initialized at the program's startup and can be retrieved at runtime
|
using the \f(CW\*(C`java.lang.System.getProperty\*(C'\fR method.
|
using the \f(CW\*(C`java.lang.System.getProperty\*(C'\fR method.
|
.IP "\fB\-lgij\fR" 4
|
.IP "\fB\-lgij\fR" 4
|
.IX Item "-lgij"
|
.IX Item "-lgij"
|
Create an application whose command-line processing is that
|
Create an application whose command-line processing is that
|
of the \f(CW\*(C`gij\*(C'\fR command.
|
of the \f(CW\*(C`gij\*(C'\fR command.
|
.Sp
|
.Sp
|
This option is an alternative to using \f(CW\*(C`\-\-main\*(C'\fR; you cannot use both.
|
This option is an alternative to using \f(CW\*(C`\-\-main\*(C'\fR; you cannot use both.
|
.IP "\fB\-static\-libgcj\fR" 4
|
.IP "\fB\-static\-libgcj\fR" 4
|
.IX Item "-static-libgcj"
|
.IX Item "-static-libgcj"
|
This option causes linking to be done against a static version of the
|
This option causes linking to be done against a static version of the
|
libgcj runtime library. This option is only available if
|
libgcj runtime library. This option is only available if
|
corresponding linker support exists.
|
corresponding linker support exists.
|
.Sp
|
.Sp
|
\&\fBCaution:\fR Static linking of libgcj may cause essential parts
|
\&\fBCaution:\fR Static linking of libgcj may cause essential parts
|
of libgcj to be omitted. Some parts of libgcj use reflection to load
|
of libgcj to be omitted. Some parts of libgcj use reflection to load
|
classes at runtime. Since the linker does not see these references at
|
classes at runtime. Since the linker does not see these references at
|
link time, it can omit the referred to classes. The result is usually
|
link time, it can omit the referred to classes. The result is usually
|
(but not always) a \f(CW\*(C`ClassNotFoundException\*(C'\fR being thrown at
|
(but not always) a \f(CW\*(C`ClassNotFoundException\*(C'\fR being thrown at
|
runtime. Caution must be used when using this option. For more
|
runtime. Caution must be used when using this option. For more
|
details see:
|
details see:
|
<\fBhttp://gcc.gnu.org/wiki/Statically%20linking%20libgcj\fR>
|
<\fBhttp://gcc.gnu.org/wiki/Statically%20linking%20libgcj\fR>
|
.Sh "Code Generation"
|
.Sh "Code Generation"
|
.IX Subsection "Code Generation"
|
.IX Subsection "Code Generation"
|
In addition to the many \fBgcc\fR options controlling code generation,
|
In addition to the many \fBgcc\fR options controlling code generation,
|
\&\fBgcj\fR has several options specific to itself.
|
\&\fBgcj\fR has several options specific to itself.
|
.IP "\fB\-C\fR" 4
|
.IP "\fB\-C\fR" 4
|
.IX Item "-C"
|
.IX Item "-C"
|
This option is used to tell \fBgcj\fR to generate bytecode
|
This option is used to tell \fBgcj\fR to generate bytecode
|
(\fI.class\fR files) rather than object code.
|
(\fI.class\fR files) rather than object code.
|
.IP "\fB\-\-resource\fR \fIresource-name\fR" 4
|
.IP "\fB\-\-resource\fR \fIresource-name\fR" 4
|
.IX Item "--resource resource-name"
|
.IX Item "--resource resource-name"
|
This option is used to tell \fBgcj\fR to compile the contents of a
|
This option is used to tell \fBgcj\fR to compile the contents of a
|
given file to object code so it may be accessed at runtime with the core
|
given file to object code so it may be accessed at runtime with the core
|
protocol handler as \fBcore:/\fR\fIresource-name\fR. Note that
|
protocol handler as \fBcore:/\fR\fIresource-name\fR. Note that
|
\&\fIresource-name\fR is the name of the resource as found at runtime; for
|
\&\fIresource-name\fR is the name of the resource as found at runtime; for
|
instance, it could be used in a call to \f(CW\*(C`ResourceBundle.getBundle\*(C'\fR.
|
instance, it could be used in a call to \f(CW\*(C`ResourceBundle.getBundle\*(C'\fR.
|
The actual file name to be compiled this way must be specified
|
The actual file name to be compiled this way must be specified
|
separately.
|
separately.
|
.IP "\fB\-d\fR \fIdirectory\fR" 4
|
.IP "\fB\-d\fR \fIdirectory\fR" 4
|
.IX Item "-d directory"
|
.IX Item "-d directory"
|
When used with \f(CW\*(C`\-C\*(C'\fR, this causes all generated \fI.class\fR files
|
When used with \f(CW\*(C`\-C\*(C'\fR, this causes all generated \fI.class\fR files
|
to be put in the appropriate subdirectory of \fIdirectory\fR. By
|
to be put in the appropriate subdirectory of \fIdirectory\fR. By
|
default they will be put in subdirectories of the current working
|
default they will be put in subdirectories of the current working
|
directory.
|
directory.
|
.IP "\fB\-fno\-bounds\-check\fR" 4
|
.IP "\fB\-fno\-bounds\-check\fR" 4
|
.IX Item "-fno-bounds-check"
|
.IX Item "-fno-bounds-check"
|
By default, \fBgcj\fR generates code which checks the bounds of all
|
By default, \fBgcj\fR generates code which checks the bounds of all
|
array indexing operations. With this option, these checks are omitted, which
|
array indexing operations. With this option, these checks are omitted, which
|
can improve performance for code that uses arrays extensively. Note that this
|
can improve performance for code that uses arrays extensively. Note that this
|
can result in unpredictable behavior if the code in question actually does
|
can result in unpredictable behavior if the code in question actually does
|
violate array bounds constraints. It is safe to use this option if you are
|
violate array bounds constraints. It is safe to use this option if you are
|
sure that your code will never throw an \f(CW\*(C`ArrayIndexOutOfBoundsException\*(C'\fR.
|
sure that your code will never throw an \f(CW\*(C`ArrayIndexOutOfBoundsException\*(C'\fR.
|
.IP "\fB\-fno\-store\-check\fR" 4
|
.IP "\fB\-fno\-store\-check\fR" 4
|
.IX Item "-fno-store-check"
|
.IX Item "-fno-store-check"
|
Don't generate array store checks. When storing objects into arrays, a runtime
|
Don't generate array store checks. When storing objects into arrays, a runtime
|
check is normally generated in order to ensure that the object is assignment
|
check is normally generated in order to ensure that the object is assignment
|
compatible with the component type of the array (which may not be known
|
compatible with the component type of the array (which may not be known
|
at compile\-time). With this option, these checks are omitted. This can
|
at compile\-time). With this option, these checks are omitted. This can
|
improve performance for code which stores objects into arrays frequently.
|
improve performance for code which stores objects into arrays frequently.
|
It is safe to use this option if you are sure your code will never throw an
|
It is safe to use this option if you are sure your code will never throw an
|
\&\f(CW\*(C`ArrayStoreException\*(C'\fR.
|
\&\f(CW\*(C`ArrayStoreException\*(C'\fR.
|
.IP "\fB\-fjni\fR" 4
|
.IP "\fB\-fjni\fR" 4
|
.IX Item "-fjni"
|
.IX Item "-fjni"
|
With \fBgcj\fR there are two options for writing native methods: \s-1CNI\s0
|
With \fBgcj\fR there are two options for writing native methods: \s-1CNI\s0
|
and \s-1JNI\s0. By default \fBgcj\fR assumes you are using \s-1CNI\s0. If you are
|
and \s-1JNI\s0. By default \fBgcj\fR assumes you are using \s-1CNI\s0. If you are
|
compiling a class with native methods, and these methods are implemented
|
compiling a class with native methods, and these methods are implemented
|
using \s-1JNI\s0, then you must use \f(CW\*(C`\-fjni\*(C'\fR. This option causes
|
using \s-1JNI\s0, then you must use \f(CW\*(C`\-fjni\*(C'\fR. This option causes
|
\&\fBgcj\fR to generate stubs which will invoke the underlying \s-1JNI\s0
|
\&\fBgcj\fR to generate stubs which will invoke the underlying \s-1JNI\s0
|
methods.
|
methods.
|
.IP "\fB\-fno\-assert\fR" 4
|
.IP "\fB\-fno\-assert\fR" 4
|
.IX Item "-fno-assert"
|
.IX Item "-fno-assert"
|
Don't recognize the \f(CW\*(C`assert\*(C'\fR keyword. This is for compatibility
|
Don't recognize the \f(CW\*(C`assert\*(C'\fR keyword. This is for compatibility
|
with older versions of the language specification.
|
with older versions of the language specification.
|
.IP "\fB\-fno\-optimize\-static\-class\-initialization\fR" 4
|
.IP "\fB\-fno\-optimize\-static\-class\-initialization\fR" 4
|
.IX Item "-fno-optimize-static-class-initialization"
|
.IX Item "-fno-optimize-static-class-initialization"
|
When the optimization level is greater or equal to \f(CW\*(C`\-O2\*(C'\fR,
|
When the optimization level is greater or equal to \f(CW\*(C`\-O2\*(C'\fR,
|
\&\fBgcj\fR will try to optimize the way calls into the runtime are made
|
\&\fBgcj\fR will try to optimize the way calls into the runtime are made
|
to initialize static classes upon their first use (this optimization
|
to initialize static classes upon their first use (this optimization
|
isn't carried out if \f(CW\*(C`\-C\*(C'\fR was specified.) When compiling to native
|
isn't carried out if \f(CW\*(C`\-C\*(C'\fR was specified.) When compiling to native
|
code, \f(CW\*(C`\-fno\-optimize\-static\-class\-initialization\*(C'\fR will turn this
|
code, \f(CW\*(C`\-fno\-optimize\-static\-class\-initialization\*(C'\fR will turn this
|
optimization off, regardless of the optimization level in use.
|
optimization off, regardless of the optimization level in use.
|
.IP "\fB\-\-disable\-assertions[=\fR\fIclass-or-package\fR\fB]\fR" 4
|
.IP "\fB\-\-disable\-assertions[=\fR\fIclass-or-package\fR\fB]\fR" 4
|
.IX Item "--disable-assertions[=class-or-package]"
|
.IX Item "--disable-assertions[=class-or-package]"
|
Don't include code for checking assertions in the compiled code.
|
Don't include code for checking assertions in the compiled code.
|
If \f(CW\*(C`=\f(CIclass-or-package\f(CW\*(C'\fR is missing disables assertion code
|
If \f(CW\*(C`=\f(CIclass-or-package\f(CW\*(C'\fR is missing disables assertion code
|
generation for all classes, unless overridden by a more
|
generation for all classes, unless overridden by a more
|
specific \f(CW\*(C`\-\-enable\-assertions\*(C'\fR flag.
|
specific \f(CW\*(C`\-\-enable\-assertions\*(C'\fR flag.
|
If \fIclass-or-package\fR is a class name, only disables generating
|
If \fIclass-or-package\fR is a class name, only disables generating
|
assertion checks within the named class or its inner classes.
|
assertion checks within the named class or its inner classes.
|
If \fIclass-or-package\fR is a package name, disables generating
|
If \fIclass-or-package\fR is a package name, disables generating
|
assertion checks within the named package or a subpackage.
|
assertion checks within the named package or a subpackage.
|
.Sp
|
.Sp
|
By default, assertions are enabled when generating class files
|
By default, assertions are enabled when generating class files
|
or when not optimizing, and disabled when generating optimized binaries.
|
or when not optimizing, and disabled when generating optimized binaries.
|
.IP "\fB\-\-enable\-assertions[=\fR\fIclass-or-package\fR\fB]\fR" 4
|
.IP "\fB\-\-enable\-assertions[=\fR\fIclass-or-package\fR\fB]\fR" 4
|
.IX Item "--enable-assertions[=class-or-package]"
|
.IX Item "--enable-assertions[=class-or-package]"
|
Generates code to check assertions. The option is perhaps misnamed,
|
Generates code to check assertions. The option is perhaps misnamed,
|
as you still need to turn on assertion checking at run\-time,
|
as you still need to turn on assertion checking at run\-time,
|
and we don't support any easy way to do that.
|
and we don't support any easy way to do that.
|
So this flag isn't very useful yet, except to partially override
|
So this flag isn't very useful yet, except to partially override
|
\&\f(CW\*(C`\-\-disable\-assertions\*(C'\fR.
|
\&\f(CW\*(C`\-\-disable\-assertions\*(C'\fR.
|
.IP "\fB\-findirect\-dispatch\fR" 4
|
.IP "\fB\-findirect\-dispatch\fR" 4
|
.IX Item "-findirect-dispatch"
|
.IX Item "-findirect-dispatch"
|
\&\fBgcj\fR has a special binary compatibility \s-1ABI\s0, which is enabled
|
\&\fBgcj\fR has a special binary compatibility \s-1ABI\s0, which is enabled
|
by the \f(CW\*(C`\-findirect\-dispatch\*(C'\fR option. In this mode, the code
|
by the \f(CW\*(C`\-findirect\-dispatch\*(C'\fR option. In this mode, the code
|
generated by \fBgcj\fR honors the binary compatibility guarantees
|
generated by \fBgcj\fR honors the binary compatibility guarantees
|
in the Java Language Specification, and the resulting object files do
|
in the Java Language Specification, and the resulting object files do
|
not need to be directly linked against their dependencies. Instead,
|
not need to be directly linked against their dependencies. Instead,
|
all dependencies are looked up at runtime. This allows free mixing of
|
all dependencies are looked up at runtime. This allows free mixing of
|
interpreted and compiled code.
|
interpreted and compiled code.
|
.Sp
|
.Sp
|
Note that, at present, \f(CW\*(C`\-findirect\-dispatch\*(C'\fR can only be used
|
Note that, at present, \f(CW\*(C`\-findirect\-dispatch\*(C'\fR can only be used
|
when compiling \fI.class\fR files. It will not work when compiling
|
when compiling \fI.class\fR files. It will not work when compiling
|
from source. \s-1CNI\s0 also does not yet work with the binary compatibility
|
from source. \s-1CNI\s0 also does not yet work with the binary compatibility
|
\&\s-1ABI\s0. These restrictions will be lifted in some future release.
|
\&\s-1ABI\s0. These restrictions will be lifted in some future release.
|
.Sp
|
.Sp
|
However, if you compile \s-1CNI\s0 code with the standard \s-1ABI\s0, you can call
|
However, if you compile \s-1CNI\s0 code with the standard \s-1ABI\s0, you can call
|
it from code built with the binary compatibility \s-1ABI\s0.
|
it from code built with the binary compatibility \s-1ABI\s0.
|
.IP "\fB\-fbootstrap\-classes\fR" 4
|
.IP "\fB\-fbootstrap\-classes\fR" 4
|
.IX Item "-fbootstrap-classes"
|
.IX Item "-fbootstrap-classes"
|
This option can be use to tell \f(CW\*(C`libgcj\*(C'\fR that the compiled classes
|
This option can be use to tell \f(CW\*(C`libgcj\*(C'\fR that the compiled classes
|
should be loaded by the bootstrap loader, not the system class loader.
|
should be loaded by the bootstrap loader, not the system class loader.
|
By default, if you compile a class and link it into an executable, it
|
By default, if you compile a class and link it into an executable, it
|
will be treated as if it was loaded using the system class loader.
|
will be treated as if it was loaded using the system class loader.
|
This is convenient, as it means that things like
|
This is convenient, as it means that things like
|
\&\f(CW\*(C`Class.forName()\*(C'\fR will search \fB\s-1CLASSPATH\s0\fR to find the
|
\&\f(CW\*(C`Class.forName()\*(C'\fR will search \fB\s-1CLASSPATH\s0\fR to find the
|
desired class.
|
desired class.
|
.IP "\fB\-freduced\-reflection\fR" 4
|
.IP "\fB\-freduced\-reflection\fR" 4
|
.IX Item "-freduced-reflection"
|
.IX Item "-freduced-reflection"
|
This option causes the code generated by \fBgcj\fR to contain a
|
This option causes the code generated by \fBgcj\fR to contain a
|
reduced amount of the class meta-data used to support runtime
|
reduced amount of the class meta-data used to support runtime
|
reflection. The cost of this savings is the loss of
|
reflection. The cost of this savings is the loss of
|
the ability to use certain reflection capabilities of the standard
|
the ability to use certain reflection capabilities of the standard
|
Java runtime environment. When set all meta-data except for that
|
Java runtime environment. When set all meta-data except for that
|
which is needed to obtain correct runtime semantics is eliminated.
|
which is needed to obtain correct runtime semantics is eliminated.
|
.Sp
|
.Sp
|
For code that does not use reflection (i.e. the methods in the
|
For code that does not use reflection (i.e. the methods in the
|
\&\f(CW\*(C`java.lang.reflect\*(C'\fR package), \f(CW\*(C`\-freduced\-reflection\*(C'\fR
|
\&\f(CW\*(C`java.lang.reflect\*(C'\fR package), \f(CW\*(C`\-freduced\-reflection\*(C'\fR
|
will result in proper operation with a savings in executable code size.
|
will result in proper operation with a savings in executable code size.
|
.Sp
|
.Sp
|
\&\s-1JNI\s0 (\f(CW\*(C`\-fjni\*(C'\fR) and the binary compatibility \s-1ABI\s0
|
\&\s-1JNI\s0 (\f(CW\*(C`\-fjni\*(C'\fR) and the binary compatibility \s-1ABI\s0
|
(\f(CW\*(C`\-findirect\-dispatch\*(C'\fR) do not work properly without full
|
(\f(CW\*(C`\-findirect\-dispatch\*(C'\fR) do not work properly without full
|
reflection meta\-data. Because of this, it is an error to use these options
|
reflection meta\-data. Because of this, it is an error to use these options
|
with \f(CW\*(C`\-freduced\-reflection\*(C'\fR.
|
with \f(CW\*(C`\-freduced\-reflection\*(C'\fR.
|
.Sp
|
.Sp
|
\&\fBCaution:\fR If there is no reflection meta\-data, code that uses
|
\&\fBCaution:\fR If there is no reflection meta\-data, code that uses
|
a \f(CW\*(C`SecurityManager\*(C'\fR may not work properly. Also calling
|
a \f(CW\*(C`SecurityManager\*(C'\fR may not work properly. Also calling
|
\&\f(CW\*(C`Class.forName()\*(C'\fR may fail if the calling method has no
|
\&\f(CW\*(C`Class.forName()\*(C'\fR may fail if the calling method has no
|
reflection meta\-data.
|
reflection meta\-data.
|
.Sh "Configure-time Options"
|
.Sh "Configure-time Options"
|
.IX Subsection "Configure-time Options"
|
.IX Subsection "Configure-time Options"
|
Some \fBgcj\fR code generations options affect the resulting \s-1ABI\s0, and
|
Some \fBgcj\fR code generations options affect the resulting \s-1ABI\s0, and
|
so can only be meaningfully given when \f(CW\*(C`libgcj\*(C'\fR, the runtime
|
so can only be meaningfully given when \f(CW\*(C`libgcj\*(C'\fR, the runtime
|
package, is configured. \f(CW\*(C`libgcj\*(C'\fR puts the appropriate options from
|
package, is configured. \f(CW\*(C`libgcj\*(C'\fR puts the appropriate options from
|
this group into a \fBspec\fR file which is read by \fBgcj\fR. These
|
this group into a \fBspec\fR file which is read by \fBgcj\fR. These
|
options are listed here for completeness; if you are using \f(CW\*(C`libgcj\*(C'\fR
|
options are listed here for completeness; if you are using \f(CW\*(C`libgcj\*(C'\fR
|
then you won't want to touch these options.
|
then you won't want to touch these options.
|
.IP "\fB\-fuse\-boehm\-gc\fR" 4
|
.IP "\fB\-fuse\-boehm\-gc\fR" 4
|
.IX Item "-fuse-boehm-gc"
|
.IX Item "-fuse-boehm-gc"
|
This enables the use of the Boehm \s-1GC\s0 bitmap marking code. In particular
|
This enables the use of the Boehm \s-1GC\s0 bitmap marking code. In particular
|
this causes \fBgcj\fR to put an object marking descriptor into each
|
this causes \fBgcj\fR to put an object marking descriptor into each
|
vtable.
|
vtable.
|
.IP "\fB\-fhash\-synchronization\fR" 4
|
.IP "\fB\-fhash\-synchronization\fR" 4
|
.IX Item "-fhash-synchronization"
|
.IX Item "-fhash-synchronization"
|
By default, synchronization data (the data used for \f(CW\*(C`synchronize\*(C'\fR,
|
By default, synchronization data (the data used for \f(CW\*(C`synchronize\*(C'\fR,
|
\&\f(CW\*(C`wait\*(C'\fR, and \f(CW\*(C`notify\*(C'\fR) is pointed to by a word in each object.
|
\&\f(CW\*(C`wait\*(C'\fR, and \f(CW\*(C`notify\*(C'\fR) is pointed to by a word in each object.
|
With this option \fBgcj\fR assumes that this information is stored in a
|
With this option \fBgcj\fR assumes that this information is stored in a
|
hash table and not in the object itself.
|
hash table and not in the object itself.
|
.IP "\fB\-fuse\-divide\-subroutine\fR" 4
|
.IP "\fB\-fuse\-divide\-subroutine\fR" 4
|
.IX Item "-fuse-divide-subroutine"
|
.IX Item "-fuse-divide-subroutine"
|
On some systems, a library routine is called to perform integer
|
On some systems, a library routine is called to perform integer
|
division. This is required to get exception handling correct when
|
division. This is required to get exception handling correct when
|
dividing by zero.
|
dividing by zero.
|
.IP "\fB\-fcheck\-references\fR" 4
|
.IP "\fB\-fcheck\-references\fR" 4
|
.IX Item "-fcheck-references"
|
.IX Item "-fcheck-references"
|
On some systems it's necessary to insert inline checks whenever
|
On some systems it's necessary to insert inline checks whenever
|
accessing an object via a reference. On other systems you won't need
|
accessing an object via a reference. On other systems you won't need
|
this because null pointer accesses are caught automatically by the
|
this because null pointer accesses are caught automatically by the
|
processor.
|
processor.
|
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
.IX Header "SEE ALSO"
|
.IX Header "SEE ALSO"
|
\&\fIgcc\fR\|(1), \fIgcjh\fR\|(1), \fIgjnih\fR\|(1), \fIgij\fR\|(1), \fIjv\-scan\fR\|(1), \fIjcf\-dump\fR\|(1), \fIgfdl\fR\|(7),
|
\&\fIgcc\fR\|(1), \fIgcjh\fR\|(1), \fIgjnih\fR\|(1), \fIgij\fR\|(1), \fIjv\-scan\fR\|(1), \fIjcf\-dump\fR\|(1), \fIgfdl\fR\|(7),
|
and the Info entries for \fIgcj\fR and \fIgcc\fR.
|
and the Info entries for \fIgcj\fR and \fIgcc\fR.
|
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
.IX Header "COPYRIGHT"
|
.IX Header "COPYRIGHT"
|
Copyright (c) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
Copyright (c) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
.PP
|
.PP
|
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or
|
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2 or
|
any later version published by the Free Software Foundation; with the
|
any later version published by the Free Software Foundation; with the
|
Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R", the Front-Cover
|
Invariant Sections being \*(L"\s-1GNU\s0 General Public License\*(R", the Front-Cover
|
texts being (a) (see below), and with the Back-Cover Texts being (b)
|
texts being (a) (see below), and with the Back-Cover Texts being (b)
|
(see below). A copy of the license is included in the
|
(see below). A copy of the license is included in the
|
man page \fIgfdl\fR\|(7).
|
man page \fIgfdl\fR\|(7).
|
.PP
|
.PP
|
(a) The \s-1FSF\s0's Front-Cover Text is:
|
(a) The \s-1FSF\s0's Front-Cover Text is:
|
.PP
|
.PP
|
.Vb 1
|
.Vb 1
|
\& A GNU Manual
|
\& A GNU Manual
|
.Ve
|
.Ve
|
.PP
|
.PP
|
(b) The \s-1FSF\s0's Back-Cover Text is:
|
(b) The \s-1FSF\s0's Back-Cover Text is:
|
.PP
|
.PP
|
.Vb 3
|
.Vb 3
|
\& You have freedom to copy and modify this GNU Manual, like GNU
|
\& You have freedom to copy and modify this GNU Manual, like GNU
|
\& software. Copies published by the Free Software Foundation raise
|
\& software. Copies published by the Free Software Foundation raise
|
\& funds for GNU development.
|
\& funds for GNU development.
|
.Ve
|
.Ve
|
|
|