AutoJar
_CamAcqJ.jar was created using AutoJar.
AutoJargenerates self-contained jars starting from a given list of classes. It searches the bytecode recursively for referenced classes, extracts the corresponding files from wherever they reside, and creates an archive containing only the classes you really need.
"Autojar helps creating jar files of minimal size from different inputs like own classes, external archives etc. It starts from a given class (e.g., an applet), recursively searches the bytecode for  references to other classes, extracts these classes from the input archives, and copies them to the output. The resulting archive will only contain the classes you really need. Thus you can keep the size and loading time of applets low or make applications independent of installed libraries.
In a similar way, autojar can search directories and archives for other resources (like image files), extract them and copy them to the output.
Note that the program can't tell which classes will be loaded dynamically (by Class.forName()). If you know these classes in advance, you can simply provide them on the command line. If you don't, however, autojar may be not suitable."
For ImageJ Plugins...
Since ImageJ plugins are normally not directly referred to by any compiled code, we need to indicate to AutoJar what to include.  One way to deal with this is to create a 'dummy' class that refers to (and thus 'exposes') the necessary classes.  I use a class called ClassExposer which contains references to any classes that might be called.  This class is actually never instantiated, so it doesn't really matter what it does, as long as it makes a reference to any classes that AutoJar would not otherwise find.
public class ClassExposer {
   public ClassExposer() {
      try {
         (new edu.mbl.jif.ijplugins.CamAcqJ_()).run("")
         edu.mbl.jif.camera.camacq.CamAcqTester.main(null);
         edu.mbl.jif.camera.camacq.CamAcq.getInstance();
         de.jppietsch.prefedit.PrefEdit.main(null);
         new com.l2fprod.common.propertysheet.PropertySheetPanel();
      } catch (BackingStoreException ex) {
         ex.printStackTrace();
      }
   }
}
Batch file for running AutoJar to Build _ijJif.jar for CamAcqJ
C:\Progra~1\Java\jdk1.5.0_09\jre\bin\java -jar autojar.jar -D -v -b -a -e ^
-o all.jar ^
-c ../build/classes ^
-c /_dev/___CamAcqJ/linkLibs/*.jar ^
edu/mbl/jif/ClassExposer.class ^
-C ../build/classes edu/mbl/jif/camera/icons/*.gif ^
-C ../build/classes edu/mbl/jif/camera/icons/*.png ^
-C ../build/classes edu/mbl/jif/acq/icons/*.gif ^
-C ../build/classes edu/mbl/jif/acq/icons/*.png ^
-C ../build/classes edu/mbl/jif/stage/icons/*.gif ^
-C ../build/classes edu/mbl/jif/utils/icons/*.gif ^
-C ../build/classes edu/mbl/jif/qcamj/icons/*.gif ^
-C ../build/classes edu/mbl/jif/gui/imaging/icons/*.gif ^
-C ../build/classes edu/mbl/jif/gui/imaging/icons/*.png ^
-C ../build/classes edu/mbl/jif/gui/spatial/icons/*.gif ^
-C ../build/classes edu/mbl/jif/gui/spatial/icons/*.png ^
-C ../build/classes edu/mbl/jif/imaging/*.png ^
-C ../build/classes edu/mbl/jif/utils/diag/*.gif ^
-C ../build/classes plugins.config ^
-C ../ QCamJNI.dll ^
-- >autoResults.txt
copy all.jar C:\Progra~1\ImageJ\plugins\_all.jar