Creating a JAR Based on a JAR Comparison

With JClass JarMaster, you can build a new JAR based on a JAR comparison. When you compare two JARs, JarMaster shows you which files are exclusive to each JAR, and if there are identically named files of different size or modification date (please see Comparing JAR Contents).

From this comparison, you can create a new JAR by giving precedence to one of these two JARs. The classes that are archived in the new JAR depend on this choice.

You may want to use this feature if you are building a "patch" JAR that is meant to be distributed to users who can refresh their existing JAR with only the required new and updated classes.

To create a JAR based on a JAR comparison:

  1. Perform a JAR comparison on the two desired JARs.

  2. Select the Compare JARs window (as shown):

  3. Click File, then Create JAR. The Create new JAR of differences dialog box appears:

  4. Enter the full path and name of the JAR in the text field, or browse to and name the JAR in the location where it is to be saved.

  5. Click Jar 1 is newer than Jar 2 if you want the new JAR to contain the classes that are unique to the first JAR. As well, identically named files from the first JAR are copied over.

    OR

    Click Jar 2 is newer than Jar 1 if you want the new JAR to contain the classes unique to the second JAR. Again, identically named files from the second JAR will also be added to the new JAR.

  6. Click Okay to create the new JAR.

    The newly created JAR appears in JarMaster's workspace. From here, you can save it or modify it.