code: public Jar addEntries(Path path, Path dirOrZip, Filter filter) throws IOException {
          if (Files.isDirectory(dirOrZip))
              addDir(path, dirOrZip, filter, true);
          else {
              try (JarInputStream jis1 = newJarInputStream(Files.newInputStream(dirOrZip))) {
                  addEntries(path, jis1, filter);
              }
          }
          return this;
      }
docs: Adds a directory (with all its subdirectories) or the contents of a zip/JAR to this JAR.
  
  @param path     the path within the JAR where the root of the directory will be placed, or {@code null} for the JAR's root
  @param dirOrZip the directory to add as an entry or a zip/JAR file whose contents will be extracted and added as entries
  @param filter   a filter to select particular classes
  @return {@code this}