Java源码示例:com.sun.istack.internal.tools.ParallelWorldClassLoader

示例1
/**
 * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar
 */
private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
    List<URL> urls = new ArrayList<URL>();

    if(Service.class.getClassLoader()==null) {
        // JAX-WS API is loaded from bootstrap classloader
        URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
        res = cl.getResource("javax/xml/bind/JAXBPermission.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
    }

    findToolsJar(cl, urls);

    return urls.toArray(new URL[urls.size()]);
}
 
示例2
/**
 * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar
 */
private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
    List<URL> urls = new ArrayList<URL>();

    if(Service.class.getClassLoader()==null) {
        // JAX-WS API is loaded from bootstrap classloader
        URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
        res = cl.getResource("javax/xml/bind/JAXBPermission.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
    }

    findToolsJar(cl, urls);

    return urls.toArray(new URL[urls.size()]);
}
 
示例3
/**
 * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar
 */
private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
    List<URL> urls = new ArrayList<URL>();

    if(Service.class.getClassLoader()==null) {
        // JAX-WS API is loaded from bootstrap classloader
        URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
        res = cl.getResource("javax/xml/bind/JAXBPermission.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
    }

    findToolsJar(cl, urls);

    return urls.toArray(new URL[urls.size()]);
}
 
示例4
/**
 * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar
 */
private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
    List<URL> urls = new ArrayList<URL>();

    if(Service.class.getClassLoader()==null) {
        // JAX-WS API is loaded from bootstrap classloader
        URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
        res = cl.getResource("javax/xml/bind/JAXBPermission.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
    }

    findToolsJar(cl, urls);

    return urls.toArray(new URL[urls.size()]);
}
 
示例5
/**
 * Creates a class loader for loading JAXB/WS 2.2 jar
 */
private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException {
    List<URL> urls = new ArrayList<URL>();

    if(Service.class.getClassLoader()==null) {
        // JAX-WS API is loaded from bootstrap class loader
        URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
        res = cl.getResource("javax/xml/bind/JAXBPermission.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
    }

    return urls.toArray(new URL[urls.size()]);
}
 
示例6
/**
 * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar
 */
private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
    List<URL> urls = new ArrayList<URL>();

    if(Service.class.getClassLoader()==null) {
        // JAX-WS API is loaded from bootstrap classloader
        URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
        res = cl.getResource("javax/xml/bind/JAXBPermission.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
    }

    findToolsJar(cl, urls);

    return urls.toArray(new URL[urls.size()]);
}
 
示例7
/**
 * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar
 */
private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
    List<URL> urls = new ArrayList<URL>();

    if(Service.class.getClassLoader()==null) {
        // JAX-WS API is loaded from bootstrap classloader
        URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
        res = cl.getResource("javax/xml/bind/JAXBPermission.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
    }

    findToolsJar(cl, urls);

    return urls.toArray(new URL[urls.size()]);
}
 
示例8
/**
 * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar
 */
private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
    List<URL> urls = new ArrayList<URL>();

    if(Service.class.getClassLoader()==null) {
        // JAX-WS API is loaded from bootstrap classloader
        URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
        res = cl.getResource("javax/xml/bind/JAXBPermission.class");
        if(res==null)
            throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
        urls.add(ParallelWorldClassLoader.toJarUrl(res));
    }

    findToolsJar(cl, urls);

    return urls.toArray(new URL[urls.size()]);
}
 
示例9
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
        return true;
    } catch(Exception e) {
        return false;
    }
}
 
示例10
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class"));
        return true;
    } catch (Exception e) {
        return false;
    }
}
 
示例11
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
        return true;
    } catch(Exception e) {
        return false;
    }
}
 
示例12
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class"));
        return true;
    } catch (Exception e) {
        return false;
    }
}
 
示例13
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
        return true;
    } catch(Exception e) {
        return false;
    }
}
 
示例14
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class"));
        return true;
    } catch (Exception e) {
        return false;
    }
}
 
示例15
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
        return true;
    } catch(Exception e) {
        return false;
    }
}
 
示例16
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class"));
        return true;
    } catch (Exception e) {
        return false;
    }
}
 
示例17
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
        return true;
    } catch(Exception e) {
        return false;
    }
}
 
示例18
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class"));
        return true;
    } catch (Exception e) {
        return false;
    }
}
 
示例19
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
        return true;
    } catch(Exception e) {
        return false;
    }
}
 
示例20
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class"));
        return true;
    } catch (Exception e) {
        return false;
    }
}
 
示例21
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
        return true;
    } catch(Exception e) {
        return false;
    }
}
 
示例22
private static boolean useBootClasspath(Class clazz) {
    try {
        ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class"));
        return true;
    } catch (Exception e) {
        return false;
    }
}