Honey, I shrank the JARs - Mostly nerdless
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Femtojar is a new open-source Maven plugin and CLI tool that reduces Java JAR file sizes by up to 50%. It works by packing all class files into a single compressed blob (instead of storing them individually as ZIP entries), using a custom BundleBootstrap classloader to handle execution, and optionally applying ProGuard for bytecode optimization (dead-code removal, inlining). Zopfli compression is used to further optimize the ZIP container. A real-world example shows jstall shrinking from 0.432MB to 0.2MB with MAX compression. The plugin integrates easily into Maven builds with a few lines of pom.xml configuration and supports Java 17+.
Table of contents
Changing the Source Code to Reduce SizeIntroducing femtojarJAR CompressionConclusionAuthorRelated Posts:1 Comment
Sort: