Skip to content
/ dujar Public

Basically du for .jar files - peak inside a jar file and see the sizes of the resources in the jar

License

Notifications You must be signed in to change notification settings

zikani03/dujar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dujar

My first ever Kotlin thingie, yay! 🥳

Basically du for .jar files - peak inside a jar file and see the sizes of the resources in the jar

It is still early days and I'd like it to get it to work something like goweight with the JSON output and all.

Also needs more and actual command-line arguments and maybe even a kotlin-native build.

Why?

I needed something like this at work and also needed a good reason to learn Kotlin.

Example output

Ran it on a build of zefaker, oof - those YAMLs takin up space huh.

$ java -jar dujar.jar zefaker-all.jar

1.4 MiB en-US.yml
1.0 MiB org/codehaus/groovy/runtime/ArrayUtil.class
937.8 KiB       groovyjarjarantlr4/v4/unicode/UnicodeData.class
526.3 KiB       org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml
507.2 KiB       org/apache/poi/xssf/usermodel/presetTableStyles.xml 
504.7 KiB       org/apache/groovy/util/Maps.class
356.2 KiB       nl.yml
...TRUNCATED...

Building

Assuming you have the Kotlin compiler on your PATH

$ kotlinc dujar.kt -include-runtime -d dujar.jar

Running

$ java -jar dujar.jar /path/to/file.jar

Copyright (c) Zikani Nyirenda Mwase

About

Basically du for .jar files - peak inside a jar file and see the sizes of the resources in the jar

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages