Here you can find the source of isJarFile(File f)
public static boolean isJarFile(File f)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static boolean isJarFile(File f) { if (f != null) { if (f.getName().contains(".jar") || f.getAbsolutePath().contains(".jar")) { return true; }// www . j a va2s. c o m } return false; } }