Command-Line Options Reference
Use this reference to look up builder and preview options. Generic names such as My Application stand for your own project; Invoice Viewer continues the worked configuration example from Section 4: Configuration Options. The installed tool’s --help output is the definitive reference for its version.
The overview highlights common builder options; the detailed entries that follow cover the complete command-line reference. For worked examples, see Section 4: Configuration Options.
Quick Overview: Common Builder Options
|
Option(s) |
Notes |
|||||
|
Minimum Input Required for a Normal Build |
||||||
|
Or use positional input
|
Input source: either a single JAR or a directory containing JAR files.
Positional alternative to |
|||||
|
Application Identity |
||||||
|
|
Application display name. Used in Windows metadata and Snug's per-user application identity. |
|||||
|
|
Company or vendor name. Used in Windows metadata and Snug's per-user application identity. |
|||||
|
Output |
||||||
|
|
Output Windows executable path. If omitted for a single-JAR build, Snug uses the JAR filename as the basis for the |
|||||
|
|
||||||
|
|
Application version. Accepts one to four numeric components, each from 0 to 65535. Missing trailing components default to zero. |
|||||
|
|
Windows |
|||||
|
|
Windows |
|||||
|
|
Adds a clickable "Check for a newer version" link to launcher error dialogs. |
|||||
|
|
PNG or ICO file used as the Windows executable icon. |
|||||
|
Java Runtime |
||||||
|
|
Minimum required Java major version. Default: |
|||||
|
|
Overrides the Main-Class read from the JAR manifest. |
|||||
|
|
Extra JVM option passed when the JVM is created. Repeatable. |
|||||
|
Windows Resources |
||||||
|
|
Windows application manifest embedded as |
|||||
|
|
PNG splash image shown by the native launcher before the JVM starts. |
|||||
|
|
Minimum splash duration in milliseconds. Default: |
|||||
|
|
Recommended maximum splash dimensions used for a build-time warning. Default: |
|||||
|
Runtime Behaviour and Localisation |
||||||
|
|
Controls Snug's managed Java-runtime download behaviour. Default:
Use off only when a compatible runtime will already be available on the target computer. |
|||||
|
|
Embeds launcher localisation bundles. May be repeated for individual files or supplied with a directory containing |
|||||
|
|
Allows more than one copy of the packaged application to run at the same time. By default, Snug applications are single-instance. |
|||||
|
Build and Diagnostic Tools |
||||||
|
|
Validates inputs and reports what would be built without writing an executable. |
|||||
|
|
Lists classes in the input JAR or JARs that declare |
|||||
|
|
Writes the encoded embedded payload to standard output instead of building an executable. |
|||||
|
|
Lists all tokens that can be used in the localisation files for replacement. |
|||||
|
Snug Tooling Options |
||||||
|
|
Prints Snug's own version and exits. |
|||||
|
|
Selects one options file instead of automatic lookup. See the detailed |
|||||
|
|
Writes Snug's embedded example options file and exits. If no path is supplied, the default is |
|||||
|
|
Allows |
|||||
|
|
Prints the example options configuration to standard output instead of writing a file. |
|||||
|
|
Prints Snug's command-line help. |
|||||
Command-Line Practical Reference
The detailed reference below explains each option’s syntax, purpose, default behaviour, and recommended use.
Reading the Reference
Each entry uses the same fields: option name, importance, purpose, repeatability, where to use, syntax, when to use, behaviour if omitted, example, and important note.
|
|
|
Importance |
||
|
A brief description of what the option does |
|
Repeatability |
Where to Use |
|
|
Syntax |
|
|||
|
When to use |
A description of when to use this option |
|||
|
If omitted |
What happens when the option is absent from both the command line and the loaded options files, including any default or build requirement. |
|||
|
Example |
|
|||
|
Important note |
Constraints, interactions, or cautions to consider when using the option. |
|||
Understanding Importance
Importance describes the option’s role in a normal application build:
- Required - a normal build needs this information. Input may be supplied by
--inputor the positional[JAR|DIR]form; information and scaffolding commands do not require application input. - Recommended - set this deliberately for a distributed application, even though Snug can build without it.
- Optional - use this when the application or workflow needs it. Optional settings can still affect build success or runtime behaviour.
Understanding Repeatability
Repeatability describes how many values an option is intended to receive. It does not mean that duplicate single-value options are always rejected.
- Single - supply one effective value or flag. Avoid duplicate occurrences.
- Multiple - repeat the option to supply additional values. Builder
--jvm-argand--localisationvalues accumulate across loaded options files and the command line.
Understanding Where to Use
Where to Use distinguishes saved build settings from commands best entered directly:
- Options - reserved for settings that belong only in
snug.options. No entry in this reference currently uses this classification. - CLI only - recommended placement for tooling, scaffolding, information, and diagnostics. This is a usage recommendation, not a blanket parser restriction: some diagnostic flags also work in options files, while file-selection and init flags receive special handling. Snug Preview reads its flags directly from the command line.
- Both - use the setting in a loaded options file or on the builder’s command line. Command-line single-value settings take precedence; repeatable
--jvm-argand--localisationvalues accumulate.
Snug Builder (snug.exe) Options Reference
|
|
|
Required input |
||
|
Selects the JAR file or directory of JAR files that Snug should package. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it when you want the input source to be explicit, especially in |
|||
|
If omitted |
Packaging fails if neither |
|||
|
Example |
|
|||
|
Important note |
The positional [JAR|DIR] form is also accepted in an options file. For clarity, this book recommends using |
|||
|
|
|
Recommended |
||
|
Sets the application's display name, used in Windows metadata and Snug's local application identity. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Always set this to the real application name for a normal build. |
|||
|
If omitted |
Snug uses the input JAR filename without its .jar extension, or the input directory name. |
|||
|
Example |
|
|||
|
Important note |
Together with |
|||
|
|
|
Recommended |
||
|
Sets the company or vendor name for Windows application identity. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Always set this to the real company or vendor name for a normal build. |
|||
|
If omitted |
Snug uses the resolved application name. |
|||
|
Example |
|
|||
|
Important note |
Together with |
|||
|
|
|
Recommended |
||
|
Sets the path and filename of the Windows executable that Snug creates. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it when you want to control the output filename or location. |
|||
|
If omitted |
Snug chooses the default output name for the build which is based on the input JAR file(s) or directory name. |
|||
|
Example |
|
|||
|
Important note |
If the destination executable already exists, Snug overwrites it. |
|||
|
|
|
Recommended |
||
|
Sets the Windows version number for the application identity. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it to give distributed builds a clear version number. |
|||
|
If omitted |
Snug uses |
|||
|
Example |
|
|||
|
Important note |
The version may contain one to four numeric components, each from 0 to 65535. |
|||
|
|
|
Recommended |
||
|
Sets the Windows FileDescription metadata. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it to give the executable a meaningful description in Windows properties. |
|||
|
If omitted |
Snug uses the application name as the Windows |
|||
|
Example |
|
|||
|
Important note |
This affects metadata only; it does not change the application's display name. |
|||
|
|
|
Optional |
||
|
Sets the Windows LegalCopyright metadata for the application identity. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it when you want copyright information embedded in the executable. |
|||
|
If omitted |
No custom |
|||
|
Example |
|
|||
|
Important note |
This is informational metadata and does not provide legal protection by itself. |
|||
|
|
|
Optional |
||
|
Adds a clickable "Check for a newer version" link to launcher error dialogs. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it when users should have an easy path to a download or update page. |
|||
|
If omitted |
Launcher dialogs do not include an update link. |
|||
|
Example |
|
|||
|
Important note |
Use a stable HTTPS page where users can find an updated version of your application. Snug does not check whether the page exists or provides a download. This option adds a link to the launcher's error dialog; it does not download or install application updates. |
|||
|
|
|
Optional |
||
|
Sets the icon embedded in the application executable. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it for a branded application icon. |
|||
|
If omitted |
The default Snug application icon is used. |
|||
|
Example |
|
|||
|
Important note |
This option affects the built application, unlike |
|||
|
|
|
Optional |
||
|
Embeds a Windows application manifest as |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it only when the application needs a custom Windows manifest. |
|||
|
If omitted |
No custom manifest file is embedded. |
|||
|
Example |
|
|||
|
Important note |
Snug checks that the supplied manifest is well-formed XML and rejects malformed XML during the build. This check does not confirm that the manifest contains valid or appropriate Windows application settings. You remain responsible for the manifest's contents. Test the finished executable on the Windows systems you intend to support. |
|||
|
|
|
Optional |
||
|
Overrides the Main-Class that Snug would otherwise use in the manifest. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it when discovery is ambiguous or you intentionally want a different entry point. |
|||
|
If omitted |
Snug uses its normal main-class detection behaviour. |
|||
|
Example |
|
|||
|
Important note |
The class must be a valid application entry point available in the packaged JARs.
At packaging time, use |
|||
|
|
|
Optional |
||
|
Lists classes that declare |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it when you need to inspect or troubleshoot application entry points. |
|||
|
If omitted |
Snug proceeds with its normal main-class handling. |
|||
|
Example |
|
|||
|
Important note |
This is a diagnostic command and does not replace |
|||
|
|
|
Optional |
||
|
Sets the minimum Java major version required by the application. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it when the application requires a Java version different from the default. |
|||
|
If omitted |
Snug will set the minimum Java version to Java |
|||
|
Example |
|
|||
|
Important note |
Choose the lowest Java major version that the application genuinely requires. |
|||
|
|
|
Optional |
||
|
Passes an option directly to the JVM when Snug creates it. |
|
Multiple |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it only when the Java application requires a specific JVM option, such as a memory limit or system property. |
|||
|
If omitted |
The JVM starts without any additional options supplied by Snug. |
|||
|
Example |
|
|||
|
Important note |
Invalid or unsupported JVM arguments can prevent the Java runtime from starting. |
|||
|
|
|
Optional |
||
|
Controls Snug's managed Java-runtime download behaviour. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it to control runtime downloads. Normally keep auto. Use force to exercise the managed-runtime path; a compatible Snug-managed cached runtime may still be reused. |
|||
|
If omitted |
Snug uses automatic runtime discovery and download behaviour - i.e. the value is set to |
|||
|
Example |
|
|||
|
Important note |
Using |
|||
|
|
|
Optional |
||
|
Overrides the application's default per-user cache location. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Only when a deployment has a compelling storage requirement. |
|||
|
If omitted |
On Windows, Snug normally stores application JARs under |
|||
|
Example |
|
|||
|
Important note |
Use an absolute path. The directory need not exist at build time, but it must be usable on the target computer. This setting changes the application-JAR cache, not the separate managed-JDK cache. |
|||
|
|
|
Optional |
||
|
Sets the PNG splash image shown by the launcher before the JVM starts. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it when you want a branded launcher splash while Java starts. |
|||
|
If omitted |
The launcher starts without the custom splash image. |
|||
|
Example |
|
|||
|
Important note |
This is the Snug launcher splash, separate from JVM or JavaFX splash mechanisms. |
|||
|
|
|
Optional |
||
|
Sets the minimum time the Snug splash remains visible. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it when the splash should remain visible for at least a specific duration. |
|||
|
If omitted |
Snug uses the default minimum duration of |
|||
|
Example |
|
|||
|
Important note |
This is a minimum duration, not a guarantee that the startup will finish at that time. |
|||
|
|
|
Optional |
||
|
Sets the recommended maximum splash dimensions used for a build-time warning. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it to change or disable the splash-size warning threshold. |
|||
|
If omitted |
Snug uses the default |
|||
|
Example |
|
|||
|
Important note |
This option does not resize the image. If the image exceeds the configured dimensions, Snug displays a build-time warning and continues packaging the application. |
|||
|
|
|
Optional |
||
|
Allows more than one copy of the application to run at the same time. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it only when separate simultaneous copies of the application are genuinely useful. |
|||
|
If omitted |
If the application is already running, Snug activates the existing instance instead of starting another copy. |
|||
|
Example |
|
|||
|
Important note |
For most desktop and business applications, leaving the default single-instance behaviour in place is simpler for users. |
|||
|
|
|
Optional |
||
|
Embeds launcher localisation bundles. |
|
Multiple |
Both |
|
|
Syntax |
|
|||
|
When to use |
Use it to add translated or customised launcher messages. |
|||
|
If omitted |
Only the built-in English launcher messages are available. |
|||
|
Example |
|
|||
|
Important note |
Files may be supplied individually, or a directory may contain |
|||
|
|
|
Optional |
||
|
Lists the built-in English message keys and the replacement tokens used by each key. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it when editing localisation messages to check which replacement tokens are available for each message key. |
|||
|
If omitted |
Normal command processing continues. |
|||
|
Example |
|
|||
|
Important note |
This help command displays information without building the artefact. See Section 5: Customising Launcher Messages. |
|||
|
|
|
Optional |
||
|
Creates starter localisation files and exits without building an application. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
To create English message files and optional translation templates. |
|||
|
If omitted |
No localisation files are generated. |
|||
|
Example |
|
|||
|
Important note |
The built-in English baseline is generated; use |
|||
|
|
|
Optional |
||
|
Adds a language template when generating localisation files. |
|
Multiple |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
With |
|||
|
If omitted |
Only the English baseline is generated. |
|||
|
Example |
|
|||
|
Important note |
Templates initially contain English values; translating them is a separate step. |
|||
|
|
|
Optional |
||
|
Allows |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Only when deliberately replacing previously generated translation files. |
|||
|
If omitted |
Existing files remain protected from overwrite. |
|||
|
Example |
|
|||
|
Important note |
Overwriting files can discard customised translations. |
|||
|
|
|
Optional |
||
|
Prints generated localisation templates to standard output. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
For inspection, scripting, or piping generated message templates. |
|||
|
If omitted |
Templates are written to the selected directory. |
|||
|
Example |
|
|||
|
Important note |
This is a scaffolding command and does not package an application. |
|||
|
|
|
Optional |
||
|
Selects an options file explicitly. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it when the configuration file has a different name or location. |
|||
|
If omitted |
Snug reads snug.options, then snug.windows.options on Windows, from the current working directory. Missing automatic files are skipped. The directory containing snug.exe is not searched. |
|||
|
Example |
|
|||
|
Important note |
An explicit |
|||
|
|
|
Optional |
||
|
Writes Snug's embedded example options file and exits. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it to create a starter options file. ( |
|||
|
If omitted |
No example options file is generated. |
|||
|
Example |
|
|||
|
Important note |
Snug will not overwrite an existing options file unless you also supply |
|||
|
|
|
Optional |
||
|
Allows |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it only with |
|||
|
If omitted |
Snug protects an existing destination from being overwritten by |
|||
|
Example |
|
|||
|
Important note |
This option is deliberately explicit because overwriting an options file can discard local configuration. |
|||
|
|
|
Optional |
||
|
Prints the example options configuration to standard output instead of writing a file. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it when you want to inspect or redirect the example configuration without creating a file. |
|||
|
If omitted |
|
|||
|
Example |
|
|||
|
Important note |
This is useful for scripting or comparing the embedded example configuration with an existing file. |
|||
|
|
|
Optional |
||
|
Prepares and validates the payload, then reports what would be built without writing an executable. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it to check configuration before performing a real build. |
|||
|
If omitted |
Snug performs the normal build. |
|||
|
Example |
|
|||
|
Important note |
A successful dry run does not prove that the final build or application launch will succeed. Icon loading and manifest XML checks occur later, during resource stamping. |
|||
|
|
|
Optional |
||
|
Writes the encoded embedded payload to standard output instead of building an executable. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it for low-level diagnostics or tooling around Snug's embedded payload. |
|||
|
If omitted |
Snug performs the normal build. |
|||
|
Example |
|
|||
|
Important note |
This is an advanced diagnostic option and is not normally needed for application packaging. |
|||
|
|
|
Optional |
||
|
Prints Snug's own version and exits. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it when checking which Snug build is installed. |
|||
|
If omitted |
Snug continues with normal command processing. |
|||
|
Example |
|
|||
|
Important note |
This reports the Snug tool version, not the packaged application's |
|||
|
|
|
Optional |
||
|
Displays Snug's command-line help and exits. |
|
Single |
CLI only |
|
|
Syntax |
Or
|
|||
|
When to use |
Use it to check the options supported by the installed version of Snug. |
|||
|
If omitted |
Snug continues with normal command processing. |
|||
|
Example |
Or
|
|||
|
Important note |
The built-in help is the definitive reference for the version of |
|||
Snug Preview (snug_preview.exe) Options Reference
|
|
|
Optional |
||
|
Changes the icon shown in Snug Preview dialogs. |
|
Single |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it when you want the preview dialogs to show your application's own icon rather than the Snug Preview icon. |
|||
|
If omitted |
Preview dialogs continue to use the built-in Snug Preview icon. |
|||
|
Example |
|
|||
|
Important note |
This changes preview dialogs only, not a built application. The preview window keeps the Snug mascot and shows your icon beneath its magnifying glass. Supply |
|||
|
|
|
Optional |
||
|
Loads localisation messages so Snug Preview can display launcher dialogs in additional languages. |
|
Multiple |
CLI only |
|
|
Syntax |
|
|||
|
When to use |
Use it when checking customised or translated launcher messages before building the application. |
|||
|
If omitted |
Only the built-in English messages are available in the preview language selector. |
|||
|
Example |
|
|||
|
Important note |
Repeat the option for additional files or directories. Directories are scanned at the top level only. English remains available; supplying |
|||
|
|
|
Optional |
||
|
Displays the built-in help for |
|
Single |
CLI only |
|
|
Syntax |
Or
|
|||
|
When to use |
Use it when you need to check the options supported by the installed version of Snug Preview. |
|||
|
If omitted |
Snug Preview starts normally instead of displaying help. |
|||
|
Example |
Or
|
|||
|
Important note |
Use |
|||


