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 "Check for a newer version" button 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. |
|||||
|
|
A log of effective build settings, diagnostics, and outcomes. Default: |
|||||
|
|
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 "Check for a newer version" button 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 error dialogs do not include an update button. |
|||
|
Example |
|
|||
|
Important note |
Use a stable HTTPS page where users can find an updated version of your application. The button opens the URL in the user's default browser. Snug does not check whether the page exists or provides a download, and it does not automatically check for, 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 reads Main-Class from the input JAR, or from the first JAR in filename order for a directory. It does not fall back to a later manifest. |
|||
|
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. An explicit |
|||
|
|
|
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 attempts to activate the existing instance instead of starting another copy. |
|||
|
Example |
|
|||
|
Important note |
The single-instance default is best-effort, not an exclusivity guarantee. Window activation may fail, and an unavailable instance lock allows another instance to start. Arguments from a second launch are not delivered to the running instance. |
|||
|
|
|
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 |
||
|
Writes the build report, including effective settings, diagnostic codes, warnings, and the outcome. |
|
Single |
Both |
|
|
Syntax |
|
|||
|
When to use |
When you want the build report in a particular folder or under a different filename. |
|||
|
If omitted |
|
|||
|
Example |
|
|||
|
Important note |
When |
|||
|
|
|
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 |
The dry run checks the Windows icon and the manifest's XML alongside the JARs and configuration. It does not test final file writing, Java runtime discovery on the recipient's computer, or whether the Java application will run. It still writes a build log and cannot be combined with |
|||
|
|
|
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. It cannot be combined with |
|||
|
|
|
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.exe you are running. --help displays detailed help; -h displays the shorter form. If no input is supplied by the command line or configuration, Snug reports an error and exits unsuccessfully. |
|||
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 |
|||
Diagnostic Messages Reference
The codes
SNUG-CFG-001 - Arguments or options could not be parsed
Cause. Snug rejected the command line or an options file. The message is from the in-build command line parser, unchanged.
Remedy. Fix the argument that the message names. The build log also records the failure.
Covers. Only the syntax. A file that parses but says something nonsensical is a different code.
SNUG-CFG-002 - The effective configuration is invalid
Cause. The options were syntactically fine but do not describe a build that Snug can perform - no input at all, or an output on a platform whose embedded launcher is not a Windows Portable Executable.
Remedy. The message names the option to change.
Input
SNUG-INPUT-001 - The input is missing or unusable
Cause. The JAR or directory named by --input (or the positional argument) does not exist, cannot be read, or is not a JAR.
Remedy. Check the path. The message shows the path snug tried.
SNUG-INPUT-002 - A directory entry could not be read
Cause. A directory listed as the input contained an entry that could not be read - it could not be opened, or it was empty - so it was left out of the build.
Why it is a warning and not an error. The build carries on with the JARs it could read. This used to be a silent skip - a failed read was discarded and the build carried on with fewer JARs than the directory held, with nothing on screen to say so. It used to be worse than silent: the read failure aborted the whole build as SNUG-INTERNAL-001, which tells the user to report a snug bug they did not cause.
Covers. The entry is named, and the build says what it did about it. A directory in which every JAR was skipped is a different problem - there is nothing left to build - and is reported as SNUG-INPUT-001.
Remedy. Check the directory's permissions if a JAR you expected is missing from the build.
Archives
SNUG-JAR-001 - The supplied archive is not a readable ZIP
Cause. A file that was handed to snug as a JAR could not be opened as a ZIP archive.
Remedy. Re-export the JAR, or remove it from the input.
Covers. Every supplied archive is opened, including when --main-class overrides the manifest. An override must not turn an archive that cannot be read into one that is silently embedded: the build would succeed and the application would fail at runtime.
SNUG-MANIFEST-001 - The manifest could not be read
Cause. A JAR's META-INF/MANIFEST.MF could not be read: the entry is there, but reading it failed - a corrupted archive, most often.
Remedy. Re-export the JAR, or pass --main-class <CLASS> to name the entry point directly. The manifest is only read when snug has to find the entry point itself.
Covers. A JAR that is not a readable ZIP is reported as SNUG-JAR-001 instead, and the manifest check is skipped rather than reported twice. This is the user's archive, not a snug bug, so it never arrives as SNUG-INTERNAL-001.
Entry point
SNUG-MAIN-001 - No usable entry point was selected
Cause. No JAR declares a Main-Class and --main-class was not given. The launcher would have nothing to call - neither a main method nor the JavaFX Application.launch fallback can be reached without a class name.
Remedy. Pass --main-class <CLASS>, or run snug --find-main to list the classes that declare one.
This is a behaviour change. Snug used to build an executable with no entry point and let it fail on the user's machine.
SNUG-MAIN-002 - The selected class is not in any supplied JAR
Cause. --main-class names a class that no supplied JAR contains.
Remedy. Check the spelling, and check that the JAR containing it was included in the input.
Covers. The classpath that is being embedded — the JARs snug was given. A class that arrives some other way (a Class-Path manifest reference, a nested JAR) is not on that classpath and is reported as absent.
SNUG-MAIN-003 - The entry-point method could not be verified
Cause. Snug could not confirm that the selected class — or one of its ancestors — declares public static void main(String[]). The class file may not have been readable, or the chain may have left the supplied JARs.
Why it is a warning. The Windows launcher supports the JavaFX Application.launch fallback, and a main method can be inherited. A blanket requirement for a declared method would reject working applications.
Covers. The ancestors are walked, so an inherited main is confirmed rather than reported. A class that extends javafx.application.Application is left alone too: the launcher starts it through Application.launch rather than through main.
SNUG-MAIN-004 - Several JARs declare different entry points
Cause. More than one supplied JAR declares a Main-Class, and they disagree. Snug reads the first JAR by filename; that is an ordering accident, not a decision anybody made.
Remedy. Pass --main-class <CLASS> to choose explicitly.
SNUG-MAIN-005 - The same entry class appears in more than one JAR
Cause. Two JARs contain the same class. The first JAR by filename wins.
Remedy. Remove the duplicate, or pass --main-class if the other copy is the one you want.
Dependencies
SNUG-DEP-001 — A manifest names an external classpath entry
Cause. A JAR's manifest declares a Class-Path referring to something outside the archive.
Remedy. Snug does not resolve, download or bundle manifest Class-Path entries - that is what a dependency resolver is for. Build the application as a fat JAR instead.
SNUG-DEP-002 — A nested JAR was found and not resolved
Cause. The archive contains a JAR inside a JAR.
Remedy. Snug does not resolve nested JARs. Unpack them first, or use a fat JAR that has them flattened.
Covers. One note per supplied JAR that holds them, so a Spring Boot fat JAR does not produce a line per dependency.
Bytecode
SNUG-JAVA-001 - Bytecode needs a newer Java than --min-java
Cause. A class in the supplied JARs was compiled for a newer Java release than --min-java allows. Class-file major 69 is Java 25; the release is major - 44.
Severity. An error for the selected entry class — the build would produce an executable that cannot start. A warning for every other class: optional code may never load, and a fat JAR routinely carries classes for newer releases than the one it runs on.
Remedy. Build with --min-java set to the release the entry class needs, or supply a JAR compiled for the older release.
Multi-release. An archive that declares itself multi-release serves the highest overlay at or below the configured release, falling back to the root copy. An overlay for a newer Java never raises the minimum.
Covers. Every class in every supplied JAR. The version lives in the first eight bytes of a class file, so the check reads eight bytes per class and covers the whole archive — with no scan-window caveat. This is a different guarantee from SNUG-MAIN-003, whose method-table check is bounded by a 64 KB prefix read; the two are reported separately because they are not equally strong.
Does not cover. Bytecode compatibility is not API compatibility. A class compiled for Java 25 can still call a method that does not exist in the Java 17 runtime you point --min-java at. Snug checks the class version, not the API surface.
SNUG-JAVA-002 - Preview bytecode
Cause. A class was compiled with preview features enabled, which marks it with minor version 0xFFFF.
Remedy. Pass --jvm-arg=--enable-preview to run preview classes. Snug does not add it for you - a preview class is not runnable without it, and silently enabling preview mode would change the behaviour of every other class in the application too.
Resources
SNUG-RESOURCE-001 - A supplied resource is invalid
Cause. An icon, splash image, Windows manifest or localisation bundle could not be prepared: the file could not be read, the image would not decode, the manifest is not well-formed XML, or a localisation directory holds a file that does not follow the naming convention.
Remedy. The message names the file.
Covers. The Windows manifest check is XML well-formedness only. It is not a schema check, and it does not validate the manifest against what the launcher actually activates.
Does not cover. An icon that cannot be read is reported as SNUG-OUTPUT-002 in a real build, because the icon is read while the executable is being stamped rather than while the payload is being assembled. A --dry-run reports it as SNUG-RESOURCE-001, because a dry run does the same checks without the write.
SNUG-RESOURCE-002 - The splash image is larger than recommended
Cause. The splash PNG is larger than the launcher's preferred size, so it will be scaled at runtime.
Remedy. Shrink the image. The build proceeds.
Localisation
SNUG-LOCALISATION-001 - A localisation bundle is incomplete, or has drifted
Cause. A supplied translation bundle does not cover every key in the built-in English baseline, or it uses different placeholders than the baseline does.
Why it is a warning and not an error. A missing key falls back to the built-in English text, so the launcher still runs and the build is not worth refusing. A drifted placeholder is reported rather than repaired.
Remedy. Copy the missing keys across from the baseline, and run snug --list-tokens for the placeholder contract.
Output and log
SNUG-OUTPUT-001 - The output and an input are the same file
Cause. The output path names one of the build's inputs: a JAR, the options file, a localisation file, the build log, or a JAR inside a directory input.
Remedy. Pass a different output path. Snug reads every input into memory before writing anything, so proceeding would destroy the input with no backup.
SNUG-OUTPUT-002 - The output could not be written
Cause. The executable could not be created — the path is not writable, or the icon, version resource or manifest could not be stamped into it.
Remedy. The message carries the underlying cause.
SNUG-LOG-001 - A write to the log failed
Cause. The log could not be written completely, usually because the disk filled or the file was locked.
Remedy. The build's own result is unaffected — snug reports this rather than claiming a complete log was saved.
SNUG-LOG-002 - The log destination could not be opened
Cause. The requested --build-log path could not be opened for writing, or it names one of the build's own input files. A path whose parent directory does not exist is the common case: snug does not create directories, so the open fails with the operating system's own "path not found" rather than making the directory first.
Remedy. Point --build-log somewhere writable, and make sure the parent directory exists. Snug stops before creating the executable: a build whose report nobody can read is not a build worth shipping. The reason is written to a temporary log when one can be made.
Internal
SNUG-INTERNAL-001 - Something unexpected went wrong
Cause. A failure snug did not anticipate. The message carries the underlying error.
Remedy. This is a bug. Please report it with the build log.
Covers. Only failures that arrive without a code of their own. A problem the user can act on - a path that does not exist, a file that cannot be read, a bundle that does not parse - carries that problem's own code instead, because telling someone to report a bug they cannot cause is worse than useless.


