code: private void deleteEmptyJars() {
  
          File libFolder = new File(getLibFolder());
          if (libFolder.exists()) {
              File[] emptyJars = libFolder.listFiles(new FileFilter() {
  
                  public boolean accept(File pathname) {
  
                      if (pathname.getName().endsWith(".jar")) {
                          FileInputStream fileInput = null;
                          JarInputStream jarStream = null;
                          try {
                              fileInput = new FileInputStream(pathname);
                              jarStream = new JarInputStream(fileInput);
                              // check the manifest for the empty jar marker attribute
                              Manifest mf = jarStream.getManifest();
                              Attributes att = mf.getMainAttributes();
                              if ((att != null) && "true".equals(att.getValue(EMPTY_JAR_ATTRIBUTE_KEY))) {
                                  return true;
                              }
                          } catch (Exception e) {
                              LOG.warn(e.getMessage(), e);
                          } finally {
                              if (jarStream != null) {
                                  try {
                                      jarStream.close();
                                  } catch (IOException e) {
                                      LOG.warn(e.getMessage(), e);
                                  }
                              }
                              if (fileInput != null) {
                                  try {
                                      fileInput.close();
                                  } catch (IOException e) {
                                      LOG.warn(e.getMessage(), e);
                                  }
                              }
                          }
                      }
                      return false;
                  }
              });
              for (int i = 0; i < emptyJars.length; i++) {
                  emptyJars[i].deleteOnExit();
              }
          }
      }
docs: Marks all empty jars for deletion on VM exit.<p>