Here you can find the source of isJar(File file)
private static boolean isJar(File file)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { private static boolean isJar(File file) { return existsWithExtension(file, ".jar"); }/*w ww . ja va 2s . com*/ private static boolean existsWithExtension(File file, String extension) { return file.isFile() && file.getName().toLowerCase().endsWith(extension); } }