private void removeJarFiles(final String dirPath,final String[] jarNames) throws IOException {
  if (jarNames != null) {
    for (int i=0; i < jarNames.length; i++) {
      File jarFile=new File(FilenameUtils.concat(dirPath,jarNames[i]));
      if (jarFile.exists()) {
        FileUtils.forceDelete(jarFile);
      }
    }
  }
 else {
    File dir=new File(dirPath);
    String[] jarFileNames=dir.list(jarFileFilter);
    if (jarFileNames.length != 0) {
      File jarFileToBeDeleted;
      for (      String jarFileName : jarFileNames) {
        String fullPath=FilenameUtils.concat(dirPath,jarFileName);
        jarFileToBeDeleted=new File(fullPath);
        FileUtils.forceDelete(jarFileToBeDeleted);
      }
    }
  }
}

private void removeJarFiles ( final String dirPath , final String [ ] jarNames ) throws IOException { if ( jarNames != null ) { for ( int i = 0 ; i < jarNames . length ; i ++ ) { File jarFile = new File ( FilenameUtils . concat ( dirPath , jarNames [ i ] ) ) ; if ( jarFile . exists ( ) ) { FileUtils . forceDelete ( jarFile ) ; } } } else { File dir = new File ( dirPath ) ; String [ ] jarFileNames = dir . list ( jarFileFilter ) ; if ( jarFileNames . length != 0 ) { File jarFileToBeDeleted ; for ( String jarFileName : jarFileNames ) { String fullPath = FilenameUtils . concat ( dirPath , jarFileName ) ; jarFileToBeDeleted = new File ( fullPath ) ; FileUtils . forceDelete ( jarFileToBeDeleted ) ; } } } }
removes the jar files from the given directory
