Skip to content

Build with jbundle #7

@lmangani

Description

@lmangani

We want to build and distribute our java app using jbundle (https://github.com/avelino/jbundle) to Package our app into a into self-contained binary. No JVM installation required to run the output.

project/jar → jbundle → single binary (runs anywhere)

We want to redesign our build github action to use jbundle and create distribution files (multiplatform) upon a release

Installation From source

git clone https://github.com/avelino/jbundle.git
cd jbundle
cargo install --path .

Usage

Build with specific Java version

jbundle build --input . --output ./dist/app --java-version 21

Cross-platform target

jbundle build --input . --output ./dist/app --target linux-x64

Pass JVM arguments

jbundle build --input . --output ./dist/app --jvm-args "-Xmx512m"

CLI profile (fast startup, optimized for short-lived tools)

jbundle build --input . --output ./dist/app --profile cli

Disable AppCDS generation

jbundle build --input . --output ./dist/app --no-appcds

Enable CRaC checkpoint (Linux, requires CRaC-enabled JDK)

jbundle build --input . --output ./dist/app --crac

Show cache info

jbundle info

Clean cache

jbundle clean

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions