A JAR file packages Java application dependencies and can conceal substantial size from unused libraries, reflective code, embedded assets, and platform-specific native binaries. section 8.2.2
Analyze JAR size systematically:
- Inspect dependency trees to identify transitive libraries and the versions selected by the build. section 8.2.2
- Unpack Spring Boot’s single JAR and sort BOOT-INF/lib contents by size. section 8.2.2
- Check for unused declared dependencies, reflective libraries, embedded assets, and native binaries bundled for unsupported platforms. section 8.2.2
du -sh BOOT-INF/lib/* | sort -h | tail -20
Sorts Spring Boot library contents by size, exposing the largest contributors to the application JAR. section 8.2.2

