An open API service indexing awesome lists of open source software.

https://github.com/sanel/jarbloat

Analyze java jar files
https://github.com/sanel/jarbloat

analysis clojure graphviz-dot jar java treemap

Last synced: 7 months ago
JSON representation

Analyze java jar files

Awesome Lists containing this project

README

          

# jarbloat
[![jarbloat tests](https://github.com/sanel/jarbloat/actions/workflows/test.yml/badge.svg)](https://github.com/sanel/jarbloat/actions)

A simple tool to analyze the content and size of a Java JAR file. Inspired with [go-size-analyzer](https://github.com/Zxilly/go-size-analyzer).

Features:
* Works on Java >= 8
* Detail size breakdown by files and packages
* Support multiple output formats: table (can be used in markdown or
[org-mode](https://orgmode.org/) files), json, csv and interactive html
* Support for analyzing the dependency of each class file (within a jar) and
displaying dependency graph in [Graphviz dot](https://graphviz.org/) format
* It can be compiled with [GraalVM](https://www.graalvm.org/) for fast startup

## Usage
Download the latest release from
[releases](https://github.com/sanel/jarbloat/releases) page. You can
run OS independent `jarbloat.jar` with:

```
java -jar jarbloat.jar [options]
```

or you can run OS dependant binary with:
```
# linux
jarbloat-linux-amd64 [options]

# macos
jarbloat-darwin-amd64 [options]

# windows
jarbloat-windows-amd64.exe [options]
```

## Compilation

To compile jarbloat, make sure you have
[leiningen](https://leiningen.org/) installed and `make`. Run:

```
make uberjar
```

and you will get a standalone uberjar in `target/jarbloat.jar.` To
compile it to a standalone binary, install
[GraalVM](https://www.graalvm.org/) and run:

```
make native NATIVE_IMAGE=
```

Github Actions will automatically create OS dependent binaries for
every new release.

## License

Copyright © 2024 Sanel Zukan

This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License, v. 2.0 are satisfied: GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or (at your
option) any later version, with the GNU Classpath Exception which is available
at https://www.gnu.org/software/classpath/license.html.