Rechercher une page de manuel

Chercher une autre page de manuel:


Langue: en

Autres versions - même langue

Version: 259053 (debian - 07/07/09)

Section: 1 (Commandes utilisateur)


jikes - java source to bytecode compiler


jikes [-options] [+options] [@files]

Options, @files, and filenames may be intermixed. Individual options should not be repeated, unless noted below.


Jikes translates Java(TM) source files to bytecode. Features include strict adherence to the language specification, automatic makefile generation and incremental compilation. It is maintained by the Jikes Project.

At this time, jikes only recognizes the full name of options; you cannot abbreviate or group them. You can give different argument types in any order. Options are global, so they affect compilation of files listed earlier on the command line. Duplicated options override the previous one, unless otherwise listed. If an option is listed in the form +T=n, it can also be specified as +T n or even +Tn.


Jikes may be invoked with the following command-line options:
-bootclasspath path
--bootclasspath path
Use path for the bootclasspath. This path is searched first for library class files, and is usually set to java/lib/ or java/jre/lib/rt.jar. This defaults to an empty path.
-classpath path
-cp path
--classpath path
Use path for CLASSPATH. This path is searched for both user source and compiled class files. This defaults to the current directory.
-d directory
--target-directory directory
Write class files in the specified directory. Note that this directory is NOT in your classpath unless you list it there as well. This defaults to the current directory.
No effect (recognized for compatibility).
Recompile all used classes.
Report uses of deprecated features.
-encoding encoding
--encoding encoding
Use specified encoding to read source files. This is not available in some builds, because it requires a working iconv or ICU encoder. Note that binary distributions for some platforms (such as Windows) do NOT include support for the encoding option, as there is not an adequate transcoding library available on all platforms by default. You can tell if a binary has encoding support or not by running jikes --help and looking for the --encoding option: if it is not listed, then this binary does NOT include support for encoding. This defaults to a platform-dependent encoding (such as ASCII).
-extdirs path
--extdirs path
Use path for extensions directories. This is typically set to grab jar and zip extension files located in java/jre/lib/ext. This defaults to an empty path.
Equivalent to -g:source,lines,vars.
Specify which of three classfile debug options should be enabled. If this is not specified, the default is source,lines. source stores the filename of the source file in the class file, lines adds line number tracking to tie bytecodes to their location in the source file, and vars adds a table in the class file which stores the name of local variables and parameters, as well as their scope. This defaults to line and source information, but not vars.
Prints a helpful summary of options, then exit. Overrides all other options, and nothing is compiled.
No effect, since jikes is native code, and does not need a Virtual Machine (ignored for compatibility).
Do not issue warning messages. For greater control over warnings and cautions, see the +Z option.
Do not write any class files, but list which ones would be written if used with -verbose.
Optimize the bytecode. Technically, this means jikes should inline private and final methods where appropriate, but currently it does nothing.
-source release
--source release
Specify which Java SDK release the source syntax obeys. For example, to treat the assert keyword as a normal identifier, you can use -source 1.3. Setting a lower target results in backward compatibility compilation of old source files. Valid releases are 1.3 (Java Language Specification, 2nd edition), and 1.4 (addition of the assert statement, JSR 41). Plans are underway to eventually support 1.5 (addition of generics: JSR 14; autoboxing, enhanced for-loop, static import, enums, and varargs: JSR 201; metadata: JSR 175; and updated .class file format: JSR 202; ultimately the Java Language Specification, 3rd edition). If not specified, this defaults to the valid value closest to the one specified or defaulted for -target (typically 1.4).
-sourcepath path
--sourcepath path
Use path for specifying user "source only" directories. Class files in this path are ignored unless listed in other paths. This defaults to the empty path.
-target release
--target release
Specify which Java SDK release the bytecode should target. For example, exception chaining was introduced in the 1.4 release, so a failed class literal can chain the NoClassDefFoundError to its original ClassNotFoundException; while the behavior in the 1.3 release simply discards the original exception. To get the old behavior, you can use -target 1.3. Setting a lower target results in forward compatibility to older virtual machines, and some source constructs will be compiled to less efficient workarounds in order to avoid known virtual machine bugs or deficiencies. However, a lower target may occasionally produce incorrect semantic behavior. Furthermore, some language features require virtual machine support, where there are no known workarounds in earlier releases: the assert statement requires 1.4 (unless you also use -noassert), and the planned addition of typesafe enumerations will require 1.5. The planned addition of type parameterization (also known as generics) will work with 1.1. Valid releases are 1.1, 1.2, 1.3, 1.4, and 1.4.2; plans are underway to support 1.5. If not specified, this defaults to the value specified for -source, and if that is not specified, this defaults to 1.4.2.
List files read and written. Also useful with -nowrite for a dry run to track dependencies.
Print a version message, and contact information, then exit. Overrides all other options except --help, and nothing is compiled.
Equivalent to +Z2, provided for javac compatibility.
Write error messages to standard output, not stderr. At the moment, this is incompatible with javac, which takes an argument as the name of the file where it will direct compiler message output.
Synonym to +Pswitchcheck. Warns about fallthrough switch cases.
Compile in incremental mode. In this mode, jikes stays resident, and every keypress of Enter will trigger a recompilation of every source file rendered out-of-date by file modifications since the last compilation phase. To exit this mode, type q then Enter.
Do not emit assert statements. This option is not recommended for disabling asserts, because asserts are compiled to have minimal overhead when disabled through the virtual machine. Rather, it is intended for reducing classfile size, and to allow the use of -target 1.3 or earlier virtual machine targets that do not support the assert statement.
Do not invoke bytecode generator. Perform semantic checks only.
Report errors immediately in emacs-form without buffering.
Write report of dependencies to specified file.
List errors in emacs-form.
Do full dependence check except for Zip and Jar files.
Map name to type keyword. Multiple options are needed to change more than one type keyword.
Generate makefile dependencies.
Select to use same classpath search order as in older versions of Jikes (for compatibility).
Pedantic compilation - issues lots of warnings. With no group name, this turns on a default set of pedantic warnings which does not correspond to any of the named groups of warnings. Specifying a group name turns on or off that particular named group of warnings, depending on the presence of the no- prefix. Some named groups are enabled by default. These are marked as such in the output of jikes --help. At present, the recognized group names are effective-java, which warns about the anti-patterns mentioned in Joshua Bloch's book "Effective Java"; modifier-order, which warns about the recommended ordering of multiple modifiers; redundant-modifiers, which warns about explicitly mentioning an implied modifier; serial, which warns about serializable classes without serialVersionUID fields; shadow, which warns about shadowing and hiding of fields; switchcheck, which warns about fallthrough between cases of switch statements; naming-convention, which warns about names that violate Java naming conventions; unused-type-imports, which warns about unused single-type import statements; and unused-package-imports, which warns about unused package import statements. In addition, the pseudo-group all stands for all named groups of warnings, but not the anonymous group controlled by +P. Multiple +P options are cumulative in effect. For example, to get all pedantic warnings except modifier ordering, use +P +Pall +Pno-modifier-order. To get just warnings about redundant modifiers, without other pedantic warnings, use +Predundant-modifiers.
Synonym for +P, but does not accept flags.
Set value of tab to n spaces. If not specified, the default is 8.
Do full dependence check including Zip and Jar files.
Do not issue warning messages.
Treat cautions as errors.
Treat both warnings and cautions as errors.
Equivalent to +Z1 for compatibility with earlier versions of Jikes.

An argument may have the form @file, which names a file holding additional command-line arguments. Each line in that file is treated as an argument, except that lines beginning with @ are not expanded recursively. Lines may optionally be quoted using either single or double quotes. There are no escape characters ('\' is not treated as special).


Jikes has several options related to classpath searching. The -bootclasspath, -extdirs, and -sourcepath options are the same as in javac. In addition to being specified on the command line, the environment variables BOOTCLASSPATH, EXTDIRS, and SOURCEPATH may also be used to specify values for these options, respectively. Jikes also has the -classpath option as in javac, with the corresponding environment variable CLASSPATH. The classpath may also be specified in the environment variable JIKESPATH, although this use is discouraged. If JIKESPATH and CLASSPATH coexist, preference will be given to JIKESPATH. A value specified on the command line will be always be given preference over the value of any environment variable. All the directories and files specified in these options or environment variables must be in the platform path format (usually a colon-separated list, e.g., ".:$HOME/java/jre/lib/rt.jar").


Jikes Project homepage for news of recent developments, to download new versions, to report bugs, or to learn how to participate in the development process. Copyright © 1996-2003, 2004 IBM Corporation and others. All Rights Reserved.

Jikes is licensed under the IBM Public License, included in the file license.htm distributed with the program, and also available at the Jikes Project URL. Portions of Jikes are derived from prior, freely distributable projects. For more details on this code, see the comments in src/double.h, src/platform.h, and src/unzip.h.


Java is a registered trademark of Sun Microsystems, Inc.
20:49 JE T'EMMERDE CONNARD (dans le sens non-convivial du terme).