Here you can find the source of isJarURL(URL url)
true
if specified URL is a jar: URL, otherwise returns false
public static boolean isJarURL(URL url)
//package com.java2s; import java.net.URL; public class Main { /**/* w w w .j a v a2 s. c o m*/ * Returns <code>true</code> if specified URL is a <tt>jar:</tt> URL, * otherwise returns <code>false</code> */ public static boolean isJarURL(URL url) { return "jar".equals(url.getProtocol()); } }