org.apache.axis2.deployment.util.Utils.getURLsForAllJars()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.apache.axis2.deployment.util.Utils.getURLsForAllJars()方法的一些代码示例,展示了Utils.getURLsForAllJars()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getURLsForAllJars()方法的具体详情如下:
包路径:org.apache.axis2.deployment.util.Utils
类名称:Utils
方法名:getURLsForAllJars

Utils.getURLsForAllJars介绍

暂无

代码示例

代码示例来源:origin: apache/axis2-java

public static ClassLoader createClassLoader(URL archiveUrl, URL[] extraUrls,
                      ClassLoader serviceClassLoader,
                      File tmpDir,
                      boolean isChildFirstClassLoading) {
  List<URL> urls = new ArrayList<>();
  urls.addAll(Arrays.asList(Utils.getURLsForAllJars(archiveUrl, tmpDir)));
  if (extraUrls != null) {
    urls.addAll(Arrays.asList(extraUrls));
  }
  return createDeploymentClassLoader(urls.toArray(new URL[urls.size()]), serviceClassLoader,
                    isChildFirstClassLoading);
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

public static ClassLoader createClassLoader(ArrayList urls,
                      ClassLoader serviceClassLoader,
                      boolean extractJars,
                      File tmpDir,
                      boolean isChildFirstClassLoading) {
  URL url = (URL)urls.get(0);
  if (extractJars) {
    try {
      URL[] urls1 = Utils.getURLsForAllJars(url, tmpDir);
      urls.remove(0);
      urls.addAll(0, Arrays.asList(urls1));
      URL[] urls2 = (URL[])urls.toArray(new URL[urls.size()]);
      return createDeploymentClassLoader(urls2, serviceClassLoader,
                        null, isChildFirstClassLoading);
    } catch (Exception e) {
      log
          .warn("Exception extracting jars into temporary directory : "
             + e.getMessage()
             + " : switching to alternate class loading mechanism");
      log.debug(e.getMessage(), e);
    }
  }
  List embedded_jars = Utils.findLibJars(url);
  URL[] urls2 = (URL[])urls.toArray(new URL[urls.size()]);
  return createDeploymentClassLoader(urls2, serviceClassLoader,
                    embedded_jars, isChildFirstClassLoading);
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

public static ClassLoader createClassLoader(URL[] urls,
                      ClassLoader serviceClassLoader,
                      boolean extractJars,
                      File tmpDir,
                      boolean isChildFirstClassLoading) {
  if (extractJars) {
    try {
      URL[] urls1 = Utils.getURLsForAllJars(urls[0], tmpDir);
      return createDeploymentClassLoader(urls1, serviceClassLoader,
                        null, isChildFirstClassLoading);
    } catch (Exception e) {
      log
          .warn("Exception extracting jars into temporary directory : "
             + e.getMessage()
             + " : switching to alternate class loading mechanism");
      log.debug(e.getMessage(), e);
    }
  }
  List embedded_jars = Utils.findLibJars(urls[0]);
  return createDeploymentClassLoader(urls, serviceClassLoader,
                    embedded_jars, isChildFirstClassLoading);
}

代码示例来源:origin: org.apache.axis2/axis2-metadata

URL[] urls = Utils.getURLsForAllJars(serviceArchive, null);
for (URL url : urls) {
  classpath.add(Utils.toFile(url).getCanonicalPath());

代码示例来源:origin: apache/axis2-java

URL[] urls = Utils.getURLsForAllJars(serviceArchive, null);
for (URL url : urls) {
  classpath.add(Utils.toFile(url).getCanonicalPath());

相关文章