Norm's Class references checker


Design

This program is an attempt to allow a programmer to verify that all the files for a program are in a jar file. It does this by openning a selected jar file and having the user select the starting class file. (For Java2 this could be retrieved from the manifest.) It then reads the class byte codes extracts all the referenced classes from the Constant pool. These classes are then searched recursively for the classes they reference. There are control options to prevent searching classes in the java or javax packages. The results are displayed in a TextArea.

The Window

The programs window has a menubar (see below), input fields to enter a class name and a jar file name, a row of control buttons and a Text area log to display the search results in. The radio buttons: Classpath, Use jar and Class File control whether the class search is done using the classpath, jar file(s) or from user setable classpath(s). You would use the Classpath search when in development and have the classpath set correctly. The Use jar search only looks in the jar file(s) given.

Usage

The easiest way to invoke this program is to set the "Application to perform action" in the Window Explorer's View|Options|Filetypes menu for the jar filetype. For example:
    java.exe -cp <path>CheckClassRefs.jar CheckClassRefs -jar "%1"

Menu Items




Last modified March 30, 2001