code: public static void unzip(String jarFile, Path destination) throws IOException {
          Map<String, String> zipProperties = new HashMap<>();
          /* We want to read an existing ZIP File, so we set this to false */
          zipProperties.put("create", "false");
          zipProperties.put("encoding", "UTF-8");
          URI zipFile = URI.create("jar:" + jarFile);
  
          try (FileSystem zipfs = FileSystems.newFileSystem(zipFile, zipProperties)) {
              Path rootPath = zipfs.getPath("/");
              Files.walkFileTree(rootPath, new SimpleFileVisitor<Path>() {
                  @Override
                  public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
                      Path targetPath = destination.resolve(rootPath.relativize(dir).toString());
                      if (!Files.exists(targetPath)) {
                          Files.createDirectory(targetPath);
                      }
                      return FileVisitResult.CONTINUE;
                  }
  
                  @Override
                  public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
                      Files.copy(file, destination.resolve(rootPath.relativize(file).toString()), StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING);
                      return FileVisitResult.CONTINUE;
                  }
              });
          }
      }
docs: Unzip a jar file
  @param jarFile Jar file url like file:/path/to/foo.jar
  @param destination Directory where we want to extract the content to
  @throws IOException In case of any IO problem