loosejar


Utility library that can tell which jar libraries on your project's classpath are NOT used

loosejar

Description

loosejar is a simple Java Agent that can be used to discover unnecessary jars lying on application classpath. It performs per classloader JVM heap analysis and displays its results. loosejar can be safely used during development, QA, UAT or even in production as it doesn't modify the state of the JVM at all and adds no overhead.

The usage is very simple:

  1. Start your application or application server with -javaagent:loosejar.jar flag (loosejar.jar should obviously point to the correct path of the actual jar)
  2. Exercise your application to make sure that the classes get loaded into the JVM.
  3. Get loosejar analysis results via JMX console (open jconsole and run com.googlecode.loosejar.LooseJarMBean#summary() in MBeans folder) or on application shutdown (via regular console log).

loosejar can only be used on Java 1.5 or higher JVMs.

loosejar 1.0.0 has been released!

Mentions


The project is developed and maintained by Kyrill Alyoshin.

Project Information

Labels:
classpath profiling java jar utility unnecessary redundant find unused jars