code: public static boolean isJarFileURL(URL url) {
          return (URL_PROTOCOL_FILE.equals(url.getProtocol()) &&
                  url.getPath().toLowerCase().endsWith(JAR_FILE_EXTENSION));
      }
docs: Determine whether the given URL points to a jar file itself,
  that is, has protocol "file" and ends with the ".jar" extension.
  
  @param url the URL to check
  @return whether the URL has been identified as a JAR file URL
  @since 4.1