In addition to the many gcc options controlling code generation, gcj has several options specific to itself.
mainmethod should be invoked when the resulting executable is run. 1
--main. It defines a system property named name with value value. If value is not specified then it defaults to the empty string. These system properties are initialized at the program's startup and can be retrieved at runtime using the
ResourceBundle.getBundle. The actual file name to be compiled this way must be specified separately.
-C, this causes all generated .class files to be put in the appropriate subdirectory of directory. By default they will be put in subdirectories of the current working directory.
-fjni. This option causes gcj to generate stubs which will invoke the underlying JNI methods.
assertkeyword. This is for compatibility with older versions of the language specification.
-O2, gcj will try to optimize the way calls into the runtime are made to initialize static classes upon their first use (this optimization isn't carried out if
-Cwas specified.) When compiling to native code,
-fno-optimize-static-class-initializationwill turn this optimization off, regardless of the optimization level in use.
 The linker by default looks for a global function named
main. Since Java does not have global functions, and a
collection of Java classes may have more than one class with a
main method, you need to let the linker know which of those
main methods it should invoke when starting the application.