code: 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));
      }
docs: Determine whether the given URL points to a resource in a jar file,
  that is, has protocol "jar", "zip", "vfszip" or "wsjar".
  
  @param url the URL to check
  @return whether the URL has been identified as a JAR URL