JBalboa v0.9.3

Balboa
Summary

JBalboa is a small software engineering tool, useful for java developers working on medium to large java projects.

It consists of two parts: Links and Lookup.

Links allows you to retrieve, among other things, which jars in a given directory are never used (i.e. its classes are never imported). This will help you to clean up your lib directory.

Lookup allows you to retrieve a java class (or any other file actually) inside a directory containing any number of jars.

You can also launch the application via Java Web Start:
Click to launch the latest stable release. For any problems / questions about Java Web Start, please see the FAQ at ArgoUML (thanks). And yes, the application is not signed, so you'll have to trust me.

Last Modification: 2009-01-01

 

Table of Contents

 

 

Lookup

Lookup helps you to retrieve a given class (or any other file actually) inside the jars of a given directory.

Spring distribution Let's suppose you want to retrieve some class inside the lib directory of the latest Spring distribution. On my computer, it contains 54 subdirectories (ant, antlr, aopalliance, ...) for a total of 107 different jars.

Because of a ClassNotFoundError, you need to localize the class org.jaxen.Context. And you're out of luck, there is no jaxen subdirectory.

Or you need the reference of a specific xml file, but you're not sure of the name. Sure, you could open all 107 jars, but you should rather use JBalboa.



Start JBalboa (f.i. jgui.bat in the jbalboa-<version> directory), and switch to the Lookup tab. In the first input box, type (or select) the Spring lib directory. In the second one the class you're looking for. Do not forget to select the checkbox Search in subdirectories, click on Start and there you go.

Lookup

As you can see, the class is now found in jaxen-1.1-beta-7.jar in the dom4j subdirectory. You could also have entered Context instead of org.javen.Context to retrieve all the Context classes (there are almost 300 of them).

The search is not limited to the java classes. If you enter .xml in the second input box, you will get the list of all xml files inside the jars (74 of them). And you can use the standard wildcard operators * and ?.

In console mode, try something like: (where -s means: search subdirectories)

jcon.bat -start lookup -s <dir> <search pattern>

For instance:

jcon.bat -start lookup -s "C:/Apache/spring-2.5.6/lib" Context

For the help and the list of available options:

jcon.bat -start lookup -h
Top

 

Download

Package Release Date File
Binary (java 5) 0.9.3 Jan 2009 jbalboa-0.9.3.zip
Source 0.9.3 Jan 2009 jbalboa-0.9.3-src.zip

Top

 

Installing

Unzip the jbalboa-<version>.zip. It will create a new directory named jbalboa-<version> that will contain all the necessary jar files (specially jbalboa.jar), some batch files, and the documentation. Please do not unzip any of the jar files.

The file jbalboa-<version>-src.zip contains the project code source, for the developpers.

To uninstall JBalboa, deleting the directory jbalboa-<version> will be enough.

Top

 

Running

Important
You need Java 5 SE to execute JBalboa. You may also need to include the bin directory of your Java distribution in your PATH.

Console Mode
Open a console window in the folder where jbalboa.jar is located and execute jcon.bat on Windows. In this mode, you will need to type an additional argument to specify which feature you want to execute (Links or Lookup).

jcon.bat -start [links|lookup] [additional arguments]

See Lookup or Links for more information about the runtime arguments.

Graphical Mode
Right-click the file "jbalboa.jar" and select Open With... > Java Platform SE.
Or you can execute

jgui.bat

with any additional arguments.

Top

 

Limitations

The main limitation of JBalboa is that it does not detect dynamically imported classes. This happens f.i. quite a lot with such a framework as Spring, that connects independent modules using the information given in an XML configuration file.

Morality: if you remove a jar from a java project, make sure to test it thoroughly again.

Top

 

Support

You can contact me at bjorion@tigris.org

Top

 

License

JBalboa is licensed under the GNU General Public License.

Top

 

Acknowledgments

The code used to parse the byte code of the class files comes from JDepend, by Mike Clark.

Top

 

Possible Improvements
Top