Adding Files to a JAR

When you are viewing the contents of a JAR, you can quickly add one or more files to it. This is the easiest and fastest way of adding new files to your JAR.

Note that when you add files to a JAR, their dependencies are not included. If you want to add files as well as their dependencies, please see Adding New Dependencies to a JAR for more information.

To add files to a JAR:

  1. Open or select the JAR to which you want to add files.

  2. Click Edit, then Add File(s). The Add a file or directory dialog box appears:

  3. Browse for and select the files you want to add to your JAR. (Use SHIFT or CTRL-clicking to select multiple files.)

    In addition to selecting individual files, you can also add entire directory folders. When you add an entire directory, JarMaster's Directory Filter appears:

    Here, you can set up search conditions so that only the matching files in the directory are included.

  4. Click Add to complete the operation.

  5. The JAR window displays the updated JAR. The package structures and paths for the added files are retained and incorporated in the JAR.

    Please note that while viewing the new class details, the size and ratio figures will not appear until the JAR has been saved (and these files have been archived into the JAR).

  6. Click File, then Save to archive the new files into the JAR. When finished, JarMaster displays file sizes and compression ratios.