Presents the available command line options along with some usage examples.
To start Jalopy from the command line you may either use the provided launch script
jalopy [-options] filespec...
Or use the Java launcher to execute the Jalopy binary directly
java -jar jalopy-Help.jar [-options] filespec...
Or use the Java launcher to call the main class
java -cp jalopy-Help.jar Jalopy [-options] filespec...
Or manually configure the classpath and use the Java launcher to invoke the main class
java Jalopy [-options] filespec...
Table 5.1. Jalopy Console Plug-in command-line options
| Option | Long Option | Arguments | Description | Since |
|---|---|---|---|---|
| --classpath | <classpath> |
Specifies the classpath to use for type lookup. Entries are separated by semi
colons.If you want to have either one of the Optimize imports, Insert Serial Version UID or Ignore runtime exceptions
features working, you need to specifiy the classpath used to compile your
file(s) here.
The classpath must contain all types that are needed by your project. Specifying the Java runtime classes is optional - if they are omitted, the runtime classes of the running VM will be automatically added | 1.1 | |
| --configure | Invokes the graphical configuration dialog | 1.0 | ||
| -c | --convention | <filepath> | Specifies the absolute path to the exported code convention whose settings should be used for formatting, e.g. "d:\dev\quality\otng-jalopy.xml". If omitted, the settings of the active profile will be used | 1.0 |
| -d | --dest | <filepath> | Sets the destination directory to create/copy all formatting output into. Expects a valid directory name. If the specified directory does not exist, it will be created. If omitted, all input files will be overridden | 1.0 |
| -e | --encoding | <string> | Specifies the encoding that controls how Jalopy interprets text files containing characters beyond the ASCII character set. Expects a Java supported character encoding name (like "US-ASCII", "ISO-8859-1" or "UTF-8"). Consult the release documentation for your Java implementation to see what encodings are supported. Please note that currently Jalopy does not support any "UTF-16" encoding. If omitted, the platform default encoding is used | 1.0 |
| --filespec | <filepath> | Specifies the absolute path to a file that defines the filespecs to use for formatting (see below). The filespec strings must be separated by line delimiters. Empty lines are ignored. Please note that you can still define filespecs directly on the command-line. | 1.7 | |
| -f | --format | <string> | Sets the file format of the output files. The file format controls what end-of-line character is used. Expects either one of "UNIX", "DOS", MAC", "DEFAULT" or "AUTO" (case insensitive). If omitted, defaults to "AUTO" | 1.0 |
| --force | Sets whether the formatting of files should be forced, even if a file is up-to-date. If omitted, defaults to "false" | 1.0 | ||
| -h | --help | Displays a short help | 1.0 | |
| --history | <string> | Sets the history policy to use. Either one of "ADLER32", "CRC32" or "NONE" can be used (case insensitive). If omitted, the corresponding code convention setting will used. | 1.0 | |
| --input | <string> | Specifies the encoding that controls how Jalopy interprets input text files containing characters beyond the ASCII character set. Expects a Java supported character encoding name (like "US-ASCII", "ISO-8859-1" or "UTF-8"). Consult the release documentation for your Java implementation to see what encodings are supported. Please note that currently Jalopy does not support any "UTF-16" encoding. If omitted, the platform default encoding is used | 1.6 | |
| -l | --loglevel | <string> | Specifies the logging level for message output. Expects either one of "ERROR", "WARN", "INFO" or "DEBUG" (case insensitive). If omitted, the corresponding code convention settings will be used | 1.0 |
| --look | <string> | Defines the Swing Look&Feel that should be used. Expects either the fully qualified name of a Swing Look&Feel that can be found on the classpath. Or the abbreviation for some well known Look&Feels: Alloy, BlackStar, GreenDream, Liquid, Metal, Motif, Pgs, Plastic, Plastic3D, PlasticXP, Substance, Synthetica, Trendy, Windows (case-insensitive). Only meaningful in combination with the --configuration option. If omitted, the default Look&Feel will be used (varies from platform to platform, but can be configured via the "swing.properties" preferences file) | 1.0 | |
| --nobackup | Indicates that no backup copies should be kept. If omitted, the corresponding code convention setting will be used | 1.0 | ||
| --nofail | Indicates that processing should not stop when an error occurred. Defaults to "false" | 1.0 | ||
| --norepository | Indicates that the type repository should not be used for type lookup. Please note that this currently means that all dependent features despite the import optimization will be disabled! Only meaningful if --classpath has been set. You may want to use this option if you commonly format a single file or only a small portion of files in order to avoid the maintenance overhead of the type repository. Defaults to "false" | 1.6 | ||
| --output | <string> | Specifies the character encoding that Jalopy uses to write text files. Expects a Java supported character encoding name (like "US-ASCII", "ISO-8859-1" or "UTF-8"). Consult the release documentation for your Java implementation to see what encodings are supported. Please note that currently Jalopy does not support any "UTF-16" encoding. If omitted, the platform default encoding is used. | 1.6 | |
| -o | --override | <filepath> or <string> |
Specifies local environment variable overrides. The value might either be a file
path pointing to a properties file with key/value pairs. Or you may specify the
key/value pair(s) directly using a key=value notation where
the different pairs are separated by semi colons, e.g.
-o "author=John Doo;project=FOZZY" Please refer to the section called "Environment" for more information about environment variables. | 1.6 |
| --p | --profile | <string> | Sets the Jalopy profile that should be activated during the formatting run. Expects the name of an existing profile, e.g. "default" for the default profile. The currently active profile will be restored after formatting | 1.2.1 |
| --project | <string> | DEPRECATED. Same as --profile. See explanation there | 1.0 | |
| -q | --quiet | Suppresses noncritical messages | 1.0 | |
| -r | --recursive | Recursively formats all files in the specified directories | 1.0 | |
| --test | <boolean> | Sets whether formatting output should actually be written to disk. If set to "true" no output will be written to disk. Defaults to "false". | 1.0 | |
| -t | --thread | <integer> | Specifies the number of processing threads to use. Expects an integer argument between 1 - 8. If omitted, the corresponding code convention setting will be used | 1.0 |
| --track | <filepath> | Specifies the absolute path to a file where Jalopy will keep track of those files that would be actually formatted during a run. The file path strings will be separated by the platform line delimiter. Implies --test | 1.4 |
You can specify as many filespecs as you want, where filespec describes either file paths, directories or filter expressions. You can use any valid Perl5 (5.003) regular expression as a filter expression.
If no filespec is given and no --filespec option specified, Jalopy starts listening on STDIN.