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 final String URL_PROTOCOL_JAR = "jar"; public static final String URL_PROTOCOL_ZIP = "zip"; public static final String URL_PROTOCOL_WSJAR = "wsjar"; public static final String URL_PROTOCOL_VFSZIP = "vfszip"; public static boolean isJarURL(URL url) { String protocol = url.getProtocol(); return (URL_PROTOCOL_JAR.equals(protocol) || URL_PROTOCOL_ZIP.equals(protocol) || URL_PROTOCOL_VFSZIP.equals(protocol) || URL_PROTOCOL_WSJAR.equals(protocol)); }//from w ww . ja v a 2 s . c om }