Supported Platforms

jbundle can create binaries for multiple platforms.

Available Targets

Target
Architecture
OS

linux-x64

x86_64

Linux

linux-aarch64

ARM64

Linux

macos-x64

x86_64

macOS

macos-aarch64

ARM64 (Apple Silicon)

macOS

Usage

# Build for current platform (default)
jbundle build --input . --output ./app

# Build for Linux x64
jbundle build --input . --output ./app --target linux-x64

# Build for Linux ARM64
jbundle build --input . --output ./app --target linux-aarch64

# Build for macOS Intel
jbundle build --input . --output ./app --target macos-x64

# Build for macOS Apple Silicon
jbundle build --input . --output ./app --target macos-aarch64

Or in jbundle.toml:

Cross-Compilation

jbundle supports cross-compilation. You can build Linux binaries from macOS:

When cross-compiling, jbundle downloads two JDKs:

  1. Host JDK — Used to run jdeps (module detection) and jlink (runtime creation)

  2. Target JDK — Provides the jmods directory for the target platform

This ensures that jdeps and jlink can execute on your machine while producing a runtime for the target platform.

Platform Detection

When no --target is specified, jbundle detects the current platform:

Host OS
Host Arch
Default Target

macOS

ARM64

macos-aarch64

macOS

x86_64

macos-x64

Linux

x86_64

linux-x64

Linux

ARM64

linux-aarch64

Windows

x86_64

windows-x64

CI/CD Example

Build for multiple platforms in GitHub Actions:

Windows Support

Help wanted: Windows support is maintained on a best-effort basis. If you use jbundle on Windows and want to help keep it working, we'd love your contributions — see open issuesarrow-up-right.

jbundle runs on Windows as a build host — pre-compiled binaries are available for Windows x86_64. You can use jbundle on Windows to build Linux and macOS binaries via cross-compilation.

What works on Windows:

  • Installing and running jbundle (jbundle.exe)

  • Building uberjars from JVM projects

  • Cross-compiling to Linux/macOS targets

  • Using --java-home or JAVA_HOME to reuse a local JDK

Limitation: The output binary uses a Unix shell stub (/bin/sh), so Windows is not supported as an output target. The binaries jbundle produces run on Linux and macOS.

Install on Windows

Example: Build Linux binary from Windows

Notes

  • CRaC is Linux-only (checkpoint/restore requires Linux kernel features)

  • Binary format differs between platforms (ELF on Linux, Mach-O on macOS)

  • Shell stub uses /bin/sh which is available on all Unix-like systems

  • Windows is supported as a build host but not as an output target

Last updated

Was this helpful?