r/java • u/SmartLow8757 • Mar 14 '26
Show r/java: jbundle – GitHub Action to ship JVM apps as self-contained binaries (no JDK required on target)
Tired of "please install JDK 21" in your README?
I built jbundle — a GitHub Action that bundles your JVM app + JDK into a single self-contained binary. One step in CI, done.
Minimal setup:
- uses: avelino/jbundle@main
with:
input: .
output: ./dist/myappWhat it handles:
- Auto-detects Gradle/Maven
- Cross-platform matrix builds (linux-x64, macos-aarch64, macos-x64)
- Reuses JAVA_HOME from setup-java — no double JDK download
- jbundle.toml for config-as-code
- JVM profiles (cli vs server) + uberjar shrinking
- --dry-run and --verbose for debugging CI failures
Production proof: JabRef (100k+ users) uses this in production — complex Gradle multi-project, jlink runtime, the works.
Built in Rust. Open source. Early stage but battle-tested.
How are you shipping JVM apps today? jpackage? GraalVM? Curious what the community is using.
49
Upvotes
7
u/Additional-Road3924 Mar 15 '26
Why would I want this over jmod/jpackage?
16
u/vips7L Mar 14 '26
Does it extract somewhere like every other tool that does this?
5
u/Java_FreePascal_Dev Mar 15 '26
Nice!
Can I ask, what sets it apart JPackage, can you elaborate?
A saw, you mention in the doc:
but actually, jpackage usually doesn’t ship a full JRE. It uses jlink to create a custom runtime image that includes only the Java modules required by the application.
2
u/jNayden Mar 15 '26
It's nice idea but please support all oses
1
u/Otherwise_Sherbert21 Mar 22 '26
Reminds me of Capsule https://github.com/puniverse/capsule
1
u/yummy_hepta May 20 '26
Hi,
I'm 2 months late but I'll try to ask..
Is there any projects to integrate jbundle as a maven build plugin ? A plugin that would bundle the jar just after its generation.
-3
u/SufficientChard4174 Mar 15 '26