1 23 package com.sun.enterprise.appclient.jws.boot; 24 25 import java.io.File ; 26 import java.net.MalformedURLException ; 27 import java.net.URI ; 28 import java.net.URISyntaxException ; 29 import java.net.URL ; 30 31 36 public class ClassPathManager15 extends ClassPathManager { 37 38 42 protected ClassPathManager15(ClassLoader loader) { 43 super(loader); 44 } 45 46 public ClassLoader getParentClassLoader() { 47 return null; 48 } 49 50 public File findContainingJar(URL resourceURL) throws IllegalArgumentException , URISyntaxException { 51 File result = null; 52 if (resourceURL != null) { 53 URI uri = resourceURL.toURI(); 54 String scheme = uri.getScheme(); 55 String ssp = uri.getSchemeSpecificPart(); 56 if (scheme.equals("jar")) { 57 63 int colon = ssp.indexOf(':'); 64 String subscheme = ssp.substring(0, colon); 65 int excl = ssp.indexOf('!'); 66 String containingJarPath = ssp.substring(colon + 1, excl); 67 result = new File (containingJarPath); 68 } else { 69 throw new IllegalArgumentException (resourceURL.toExternalForm()); 70 } 71 } 72 return result; 73 } 74 75 76 } | Popular Tags |