code: @Override
      protected void parseURL(URL u, String spec, int start, int limit)
      {
          Matcher matcher = ABSOLUTE_JAR_URL_PATTERN.matcher(spec);
          if (matcher.matches()) {
              // spec is an absolute URL
              String base = matcher.group(1);
              try {
                  // Verify
                  new URL(base);
              } catch (MalformedURLException e) {
                  throw new IllegalArgumentException(e.toString());
              }
              String path = matcher.group(2) + matcher.group(3);
              path = ResourceUtils.canonizePath(path);
              String ref = matcher.group(4);
              if (ref.length() == 0) {
                  ref = null;
              } else {
                  ref = ref.substring(1);
              }
              setURL(u, JAR_PROTOCOL, "", -1, "", "", base + JAR_PROTOCOL_SEPARATOR + path, null, ref);
          } else {
              matcher = ABSOLUTE_JAR_URL_PATTERN.matcher(u.toString());
              if (matcher.matches()) {
                  String ref = spec.substring(limit);
                  if (ref.length() == 0) {
                      ref = null;
                  } else {
                      ref = ref.substring(1);
                  }
                  String newSpec = spec.substring(start, limit);
                  String base = matcher.group(1);
                  String path;
                  if (newSpec.length() > 0 && newSpec.charAt(0) == '/') {
                      path = newSpec;
                  } else {
                      String cxtDir = matcher.group(2);
                      path = cxtDir + newSpec;
                  }
                  path = ResourceUtils.canonizePath(path);
                  setURL(u, JAR_PROTOCOL, "", -1, "", "", base + JAR_PROTOCOL_SEPARATOR + path, null, ref);
              } else {
                  throw new IllegalArgumentException("Neither URL nor the spec are valid JAR URLs");
              }
          }
      }
docs: {@inheritDoc}
  
  Implementation copied from Emory's Classloader Utilities. We had to copy it since we cannot extend Emory's
  JarURLStreamHandler implementation since it extends the JDK's JAR URL Connection (see this class's description
  to understand why we cannot use it).
  
  @see URLStreamHandler#parseURL(URL, String, int, int)