For the complete documentation index, see llms.txt. This page is also available as Markdown.

JAR Analysis

Inspect your JAR before packaging to understand what's inside, find optimization opportunities, and catch potential issues.

Usage

# Analyze current project (builds uberjar first)
jbundle analyze

# Analyze a pre-built JAR directly
jbundle analyze --input ./target/app-standalone.jar

What It Reports

Category Breakdown

Every entry in the JAR is classified into one of:

Category
Matches

Classes

*.class

Clojure sources

*.clj, *.cljc, *.cljs

Java sources

*.java

Native libs

*.so, *.dylib, *.dll, *.jnilib

Metadata

META-INF/* (non-class)

Resources

Everything else

Top Packages

Entries are grouped by the first 3 path segments (matching Maven groupId convention). For example, org/apache/commons/lang3/StringUtils.class maps to org.apache.commons.

Clojure Namespaces

Detected from __init.class entries. For example, myapp/core__init.class maps to namespace myapp.core.

Shrink Estimate

Shows how much space --shrink would save by removing non-essential files (Maven metadata, JAR signatures, Java source files, build tool artifacts).

Potential Issues

  • Duplicate classes — Same class path appearing multiple times (common in uberjars with dependency conflicts)

  • Large resources — Files over 1 MB that may be worth reviewing (embedded models, datasets, etc.)

Example Output

When to Use

  • Before first build — Understand your JAR composition and spot bloat

  • Evaluating --shrink — See the savings estimate before enabling it

  • Debugging binary size — Find which dependencies are largest

  • Dependency conflicts — Detect duplicate classes from overlapping dependencies

Last updated

Was this helpful?