Repository navigation
Releases: synapticloop/snug
Release list
Initial Beta Release of Snug
snug 0.16.2 — beta
build it. brand it. share it.
Snug turns a runnable Java application into a native Windows x64 .exe that people can double-click.
This is the first public release of snug, published as a beta. It is usable today, but the command-line surface is still settling and a few sharp edges are documented below. Read the Beta caveats before you build anything you intend to distribute widely.
Read the extensive documentation synapticloop.github.io/snug/
What snug is
You have a Java application that runs as a JAR. Snug wraps that JAR — and a small native launcher — into a single Windows executable:
MyApp.jar
│
▼
snug MyApp.jar
│
▼
MyApp.exe ──► extracts to a per-user cache
──► finds a compatible Java runtime
──► calls into the JVM through JNI
──► runs your application
The result behaves like any other Windows program:
- It has your name. The process shows up in Task Manager as
MyApp.exe, notjavaw.exe. - It has your icon. PNG or ICO, stamped into the executable as a real Windows resource.
- It has your details. Name, company, version, description and copyright land in the Windows file properties, where Explorer and Task Manager read them.
- It can have a splash screen. A PNG shown while the JVM starts.
snug does not bundle a JVM
The executable carries your application, not a Java runtime. On launch, snug looks for a compatible Java install in the usual places — JAVA_HOME, JDK_HOME, PATH, the Windows registry, and common install locations — and requires Java 25 or newer by default (adjustable with --min-java).
If no compatible runtime is found, snug can offer to download Eclipse Temurin for the user, verifying the archive against its published SHA-256 before installing it. An old JDK counts as "no compatible runtime", so a machine with Java 11 installed gets the same offer as a machine with no Java at all.
Runtime behaviour worth knowing
- The JAR is extracted once into a per-user cache (
%LOCALAPPDATA%\snug\<company>\<app>\<sha256>\) and reused on later launches. - Old cache entries are swept automatically — recently used builds are kept, stale ones are removed.
- Single instance is the default. A second launch raises the already-running window and exits, instead of starting a competing copy. Opt out with
--allow-multiple-instances. - Runtime messages are localisable, and the launcher's language follows the user's Windows UI language.
What's in the download
| File | What it is |
|---|---|
snug-0.16.2-windows-x86_64.zip |
The release bundle. Unpacks to a snug\ folder containing the three tools below. |
snug-javafx-demo-windows.jar |
A runnable JavaFX demo application, so you can try snug without writing any Java. |
Inside snug\:
| Tool | What it does |
|---|---|
snug.exe |
The builder. The command-line tool that turns a JAR into an .exe. This is the one you want. |
Snug Quick Build.exe |
The beginner shim. Drop a JAR (or a folder of JARs) onto it and it builds the .exe for you, then reports the result. Must stay in the same folder as snug.exe. |
snug_preview.exe |
The dialog previewer. Renders every launcher dialog so a copy or translation change can be judged by eye. A development tool — you do not need it to build applications. |
Try it in about a minute
# 1. Unzip snug-0.16.2-windows-x86_64.zip
# 2. Put the demo JAR next to snug.exe, then:
.\snug.exe .\snug-javafx-demo-windows.jar
# 3. Double-click the snug-javafx-demo-windows.exe it just producedYour own application is the same command with your JAR:
.\snug.exe .\MyApp.jarBy default the output .exe is written next to the input JAR.
Make it yours
.\snug.exe .\MyApp.jar `
--name "My Application" `
--company "My Company" `
--version 1.2.3 `
--icon .\icon.png `
--splash .\splash.pngUseful flags:
| Flag | Purpose |
|---|---|
-o, --output |
Where to write the .exe. |
--name, --company |
Display name and publisher. |
--version, --description, --copyright |
Windows file properties. |
--icon |
Application icon (PNG or ICO). |
--splash, --splash-ms, --splash-max |
Splash screen and its timing. |
--manifest |
An arbitrary Windows application manifest (XML). |
--min-java |
Lowest acceptable Java major version. Default 25. |
--main-class |
Override the entry point when the manifest is ambiguous. |
--jvm-arg |
Pass a JVM option. Repeatable. |
--download-jdk |
off, auto (default) or force — controls the Temurin offer. |
--allow-multiple-instances |
Permit more than one copy to run. |
--localisation |
A translation file, or a directory of them. |
--dry-run |
Validate and report without writing anything. |
For repeatable builds, snug.options files supply the same settings; run snug.exe --init-options for a starter file. snug.exe --help is the authoritative reference for your build.
Localisation
Launcher messages ship with an English baseline and can be translated. --init-localisations --init-localisations-tag de writes a starter file; --list-tokens prints the placeholder contract. Snug warns at build time if a bundle's keys or placeholders do not match the English baseline.
What snug is not
This matters as much as the feature list, so it is stated plainly:
- It is not an installer. snug does not create Start menu entries, install into Program Files, or write an uninstaller. The
.exeis your application. Delete it and the application is gone — although cached files and any downloaded Java runtime may remain behind. - It is not a JVM distribution. snug does not ship a runtime; it finds one or offers to download one.
- It does not update your application. There is no auto-update mechanism. You decide how new versions reach users.
- It does not sign your executable. These builds are unsigned, so Windows SmartScreen will likely warn on first run, and some organisations block unsigned executables outright.
- It is not a
jpackagereplacement. snug produces an application executable; it is not an installer toolchain, a dependency resolver, or a native-image compiler.
Beta caveats
Known limitations in this build:
- Windows x64 only. macOS and Linux code exists in the repository but is experimental and is not part of this release.
- The CLI surface is still moving. Flags have been renamed recently —
--localizationis now--localisation,--download-jdknow requires a value, and--companyfalls back to your application name when omitted. Expect further adjustment before 1.0; now is a good time to tell us what should look different. - Java 25 is the default floor. If your application targets an older Java, either lower
--min-javaor rebuild your fat JAR against Java 25. - Single instance is enforced by default. Identity is
--company+--name, not the executable path, so two differently-branded builds run side by side — but two copies of the same build will not. - Unsigned binaries. Expect a SmartScreen prompt on first run.
- Single-instance detection and the launcher are Windows-only. macOS support is detection-only and has no splash, no download dialogs, and no error dialogs.
- The cache is per-user, under
%LOCALAPPDATA%\snug\. A portable "runs anywhere from a USB stick" deployment is not a supported scenario.
Try it and tell us what breaks
snug is developed in the open and the whole implementation is on GitHub.
- Documentation: https://synapticloop.github.io/snug/
- Source and issues: https://github.com/synapticloop/snug
- Licence: MIT or Apache-2.0, at your option.
Beta releases are for shaking out exactly the problems listed above. If something does not work — on your Java version, your Windows build, or your application — that is the most valuable thing you can report right now.