jikes(1)
πΈ jikes(1) β the java source to bytecode compiler, bestie edition πΈ
okay so welcome to jikes(1), the manual page for jikes β and yes, she's a java source to bytecode compiler, which sounds intimidating but honestly she's just out here translating your lil' human-readable Java into bytecode so the machine can vibe with it. π
β¨ NAME β¨
jikes β java source to bytecode compiler π
π¦ SYNOPSIS π¦
jikes [-options] [+options] [@files]
file.java...
so the shape of it is: you got -options, you got +options, you got @files, and then the actual file.java... files you want compiled. no cap, that's the whole vibe. β¨
π DESCRIPTION π
Jikes translates Java(TM) source files to bytecode. π«Ά that's the whole job, and she does it well.
the flex list, aka the features β she's got:
- strict adherence to the language specification π (she does not play fast and loose with the spec, ever)
- automatic makefile generation
- incremental compilation
she's maintained by the Jikes Project. π
now for the housekeeping rules, and bestie you gotta read these because they will absolutely trip you up if you skip them:
- at this time, jikes only recognizes the full name of options. so you can't abbreviate them, and you can't group them. no shortcuts, sorry π β spell it all the way out.
- you can give different argument types in any order. options,
@files, filenames, mix 'em up, she doesn't care. π - options are global, so they affect compilation of files listed earlier on the command line too. like, the files you already typed. yes, those. it's giving "main character energy affects the whole timeline."
- duplicated options override the previous one, unless otherwise listed. last one wins, periodt.
- if an option is listed in the form
+T=n, it can also be specified as+T nor even+Tn. so all three of those are the same thing β pick whichever feels cute. π
π real talk though: don't go repeating individual options for funsies. the original says individual options should not be repeated unless noted below β so like, don't do it just to see what happens.
(stay tuned, there's more β options, examples, all of it. don't go anywhere π)
β¨ OPTIONS β¨
okay bestie, this is the big one π jikes has a LOT of flags. literally a whole closet full of them. here's every single one, no skips, no cap:
-bootclasspath path,--bootclasspath pathβ use path for the bootclasspath. this one gets searched first for library class files, and it's usually pointed atjava/lib/classes.ziporjava/jre/lib/rt.jar. default is an empty path π«Ά-classpath path,-cp path,--classpath pathβ use path forCLASSPATH. this path gets searched for both user source and compiled class files. defaults to the current directory β¨-d directory,--target-directory directoryβ write class files into the directory you name. β οΈ heads up: that directory is NOT in your classpath unless you also list it there. defaults to the current directory.-debugβ no effect at all, it's just recognized for compatibility. it's giving "i'm here but i'm not doing anything" π-depend,--depend,-Xdependβ recompile all used classes.-deprecation,--deprecationβ report when deprecated features get used.-encoding encoding,--encoding encodingβ use the specified encoding to read source files. π but plot twist: this one is not available in some builds, because it needs a workingiconvor ICU encoder. binary distributions for some platforms (like Windows) do NOT include support for the encoding option, since there's not an adequate transcoding library available on all platforms by default. you can check whether your binary has encoding support by runningjikes --helpand looking for the--encodingoption β if it's not listed, then this binary does NOT include support for encoding. defaults to a platform-dependent encoding (like ASCII).-extdirs path,--extdirs pathβ use path for extensions directories. typically set to grabjarandzipextension files located injava/jre/lib/ext. defaults to an empty path.-gβ exactly the same as-gsource,lines,vars. all the debug info, periodt.-gnone|{source,lines,vars}β pick which of the three classfile debug options should be on. if you don't say anything, the default issource,lines. here's the tea:sourcestores the filename of the source file in the class file,linesadds line number tracking to tie bytecodes to where they live in the source file, andvarsadds a table in the class file storing the names of local variables and parameters plus their scope. so the default is line + source info, but notvars. π¦-help,--help,-h,-?β prints a helpful summary of options, then exits. it overrides all other options, and nothing gets compiled. it's the main character of flags honestly π-J...β no effect, because jikes is native code and doesn't need a Virtual Machine. ignored for compatibility π-nowarn,--nowarn,-qβ don't issue warning messages. want finer control over warnings and cautions? see the+Zoption.-nowrite,--nowriteβ don't write any class files, but list which ones would be written if you use it together with-verbose. dry-run vibes π-O,--optimizeβ optimize the bytecode. technically this means jikes should inlineprivateandfinalmethods where appropriate, but currently it does nothing. it's giving "i promise i'll change" π-source release,--source releaseβ say which Java SDK release the source syntax obeys. for example, to treat theassertkeyword 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 are1.3(Java Language Specification, 2nd edition) and1.4(addition of theassertstatement, JSR 41). plans are underway to eventually support1.5(addition of generics: JSR 14; autoboxing, enhanced for-loop, static import, enums, and varargs: JSR 201; metadata: JSR 175; and updated.classfile format: JSR 202; ultimately the Java Language Specification, 3rd edition). if not specified, it defaults to the valid value closest to whatever was specified or defaulted for-target(typically1.4). β-sourcepath path,--sourcepath pathβ use path to specify user "source only" directories. class files in this path are ignored unless they're listed in other paths. defaults to the empty path.-target release,--target releaseβ say which Java SDK release the bytecode should target. for example, exception chaining was introduced in the1.4release, so a failed class literal can chain theNoClassDefFoundErrorto its originalClassNotFoundException; whereas the behavior in the1.3release simply discards the original exception. to get the old behavior, you can use-target 1.3. setting a lower target gives forward compatibility to older virtual machines, and some source constructs get 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: theassertstatement requires1.4(unless you also use-noassert), and the planned addition of typesafe enumerations will require1.5. the planned addition of type parameterization (also known as generics) will work with1.1. valid releases are1.1,1.2,1.3,1.4, and1.4.2; plans are underway to support1.5. if not specified, it defaults to the value specified for-source, and if that isn't specified either, it defaults to1.4.2. π-verbose,--verbose,-vβ list files read and written. also super useful with-nowritefor a dry run to track dependencies π-version,--version,-Vβ print a version message plus contact information, then exit. overrides all other options except--help, and nothing gets compiled.-Werrorβ exactly the same as+Z2, provided forjavaccompatibility.-Xstdoutβ write error messages to standard output, notstderr. at the moment this is incompatible withjavac, which takes an argument as the name of the file where it will direct compiler message output. π-Xswitchcheckβ synonym for+Pswitchcheck. warns about fallthrough switch cases.++,--incrementalβ compile in incremental mode. in this mode jikes stays resident, and every keypress of Enter triggers a recompilation of every source file that got rendered out-of-date by file modifications since the last compilation phase. to exit this mode, typeqthen Enter. it's literally sitting there waiting for you π§+a,--noassertβ don't emitassertstatements. β οΈ this option is not recommended for disabling asserts, because asserts are compiled to have minimal overhead when disabled through the virtual machine. rather, it's intended for reducing classfile size, and to allow the use of-target 1.3or earlier virtual machine targets that don't support theassertstatement.+B,--nobytecodeβ don't invoke the bytecode generator. perform semantic checks only.+D,--dump-errorsβ report errors immediately in emacs-form without buffering.+DR=filenameβ write a report of dependencies to the specified file.+E,--emacsβ list errors in emacs-form.+F,--full-dependenceβ do a full dependence check except for Zip and Jar files.+Kname=TypeKeyWordβ map name to TypeKeyWord. you need multiple options to change more than one type keyword.+M,--makefileβ generate makefile dependencies.+OLDCSOβ select to use the same classpath search order as in older versions of jikes (for compatibility).+P[group-name]β pedantic compilation, aka it issues lots of warnings π. with no group name, this turns on a default set of pedantic warnings that doesn't correspond to any of the named groups. specifying a group name turns that particular named group of warnings on or off, depending on whether theno-prefix is there. some named groups are enabled by default β those are marked as such in the output ofjikes --help. right now the recognized group names are:effective-javaβ warns about the anti-patterns mentioned in Joshua Bloch's book "Effective Java"modifier-orderβ warns about the recommended ordering of multiple modifiersredundant-modifiersβ warns about explicitly mentioning an implied modifierserialβ warns about serializable classes withoutserialVersionUIDfieldsshadowβ warns about shadowing and hiding of fieldsswitchcheckβ warns about fallthrough between cases ofswitchstatementsnaming-conventionβ warns about names that violate Java naming conventionsunused-type-importsβ warns about unused single-type import statementsunused-package-importsβ 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. π
--pedanticβ synonym for+P, but it doesn't accept flags.+T=n,--tab=nβ set the value of a tab to n spaces. if not specified, the default is8.+U,--unzip-dependenceβ do a full dependence check including Zip and Jar files.+Z0β don't issue warning messages.+Z1β treat cautions as errors.+Z2β treat both warnings and cautions as errors.+Z,--zero-cautionsβ same as+Z1, for compatibility with earlier versions of jikes.
oh and one more thing bestie π β an argument can 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. and psst: there are no escape characters β '\' is not treated as special. iykyk π¦
ποΈ FILES ποΈ
Okay so bestie, real talk: Jikes has a whole little β¨situationβ¨ going on with classpath searching, and you need to know about it.
The -bootclasspath, -extdirs, and -sourcepath options work exactly the same as they do in javac. No glow-up, no plot twist, same behavior.
And it's not just command line, babes β you can also set these with the environment variables BOOTCLASSPATH, EXTDIRS, and SOURCEPATH, which specify the values for those options respectively. π
Jikes also has the -classpath option, just like javac, with its matching environment variable CLASSPATH. And on top of that, the classpath can also be specified in the environment variable JIKESPATH β although, ngl, that use is discouraged. π
So what happens if JIKESPATH and CLASSPATH coexist? Preference goes to JIKESPATH. Periodt. π
And the hierarchy is real: a value specified on the command line will always be given preference over the value of any environment variable. Main character energy only. β
One thing you cannot skip: 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". Get that format wrong and it's giving π.
π SEE ALSO π
- The Jikes Project homepage at
http://ibm.com/developerworks/opensource/jikes/β for news of recent developments, to download new versions, to report bugs, or to learn how to participate in the development process. Go be a part of history, bestie π«Ά
Β©οΈ COPYRIGHT Β©οΈ
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. π
π NOTES π
Java is a registered trademark of Sun Microsystems, Inc. That's just facts, no cap. π¦
And that's the whole thing, bestie β every last crumb of the jikes(1) page (the source/version line and date live down in the footer, doing their little cameo as jikes(1) at the bottom π). You ate that. Go compile something iconic. π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: jikes 1.22-bp160.1.12 Β· IPL-1.0
- opensuse-leap 16.0: jikes 1.22-bp160.1.12 Β· IPL-1.0
- opensuse-leap 16.0: jikes 1.22-bp160.1.12 Β· IPL-1.0
- opensuse-leap 16.0: jikes 1.22-bp160.1.12 Β· IPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms