Java Reference
In-Depth Information
7.5
O PTIONS AND S WITCHES
As we have said, gcj is part of the gcc suite of compilers and therefore supports
all of the non-language-specific options and switches of that suite.
As with most reference material in this topic, we will only cover the
highlights. See the gcj manpage or the project's Web site for full details. 14
-I dirname
Add dirname to the classpath ahead of its existing contents.
-D name [= value ]
Add name and optional value to the system properties list. This is only
valid with the --main switch.
--main
Specifies which class contains the application's main() . This gives the
starting point for an application.
-fno-bounds-check
Disable array bounds checking. Like “real” Java, gcj checks all array oper-
ations to ensure that array bounds are not exceeded. Using this switch
disables that check. It speeds up array operations but can introduce subtle
and hard-to-find bugs. Use at your own risk.
-fno-store-check
Like -fno-bounds-check , this disables a safety feature on arrays. Normal-
ly, when you store an object into an array, a check is made to make sure
that the object is assignment-compatible with the array type (in other
words, that the object is an instanceof() of the array type). Using this
switch disables this test. It speeds up array operations but can introduce
subtle and hard-to-find bugs. Use at your own risk.
There are other switches for native methods, bytecode (as opposed to
native) compilation, and some switches related to resources. We leave it as an
exercise for the reader to learn and use these where needed.
14. http://gcc.gnu.org/java/
Search WWH ::




Custom Search