Here you can find the source of isJarURL(URL url)
public static boolean isJarURL(URL url)
//package com.java2s; //License from project: Apache License import java.net.URL; public class Main { public static boolean isJarURL(URL url) { String protocol = url.getProtocol(); return "jar".equals(protocol) || "zip".equals(protocol) || "wsjar".equals(protocol) || "code-source".equals(protocol) && url.getPath().contains("!/"); }/* w w w.j av a 2 s .c om*/ }