Johannes Bechberger 4/30/2026

Honey, I shrank the JARs

Read Original

This article discusses techniques for reducing the size of Java JAR files, particularly for CLI tools. It introduces the femtojar open-source project, which uses JAR reencoding and optional ProGuard optimization to shrink JAR sizes by up to 50%. The post provides a tutorial on integrating femtojar into Maven builds, including configuration options for compression modes and output file naming. It compares manual source code changes (like inlining methods or reducing strings) with the automated femtojar approach, emphasizing ease of use and maintainability. The article is aimed at Java developers looking to optimize their CLI tool distributions.

Honey, I shrank the JARs

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet