Here you can find the source of isJar(final File element)
private static boolean isJar(final File element)
//package com.java2s; /*//from w w w .j a v a 2 s .co m * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ import java.io.File; public class Main { private static final String JAR_SUFFIX = ".jar"; private static boolean isJar(final File element) { return (element.isFile() && element.getName().endsWith(JAR_SUFFIX)); } }