public static void deleteClass(String className, String testDir, Configuration conf)
    throws Exception {
    String jarFileName = className + ".jar";
    File file = new File(testDir, jarFileName);
    file.delete();
    assertFalse("Should be deleted: " + file.getPath(), file.exists());

    file = new File(conf.get("hbase.dynamic.jars.dir"), jarFileName);
    file.delete();
    assertFalse("Should be deleted: " + file.getPath(), file.exists());

    file = new File(ClassLoaderTestHelper.localDirPath(conf), jarFileName);
    file.delete();
    assertFalse("Should be deleted: " + file.getPath(), file.exists());
  }
Add a list of jar files to another jar file under a specific folder. It is used to generated
coprocessor jar files which can be loaded by the coprocessor class loader. It is for testing
usage only so we don't be so careful about stream closing in case any exception.
@param targetJar the target jar file
@param libPrefix the folder where to put inner jar files
@param srcJars   the source inner jar files to be added
@throws Exception if anything doesn't work as expected
hbase-common/src/test/java/org/apache/hadoop/hbase/util/ClassLoaderTestHelper.java