java.net.URLClassLoader.findLibrary()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(123)

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

URLClassLoader.findLibrary介绍

暂无

代码示例

代码示例来源:origin: hyperic/hq

protected String findLibrary(String libname) {
    String lib =
      System.getProperty("net.covalent.lib." + libname);

    if (lib != null) {
      return lib;
    }

    return super.findLibrary(libname);
  }
}

代码示例来源:origin: diffplug/goomph

protected String findLibrary(String name) {
    if (extensionPaths == null)
      return super.findLibrary(name);
    String libName = System.mapLibraryName(name);
    for (int i = 0; i < extensionPaths.length; i++) {
      File libFile = new File(extensionPaths[i], libName);
      if (libFile.isFile())
        return libFile.getAbsolutePath();
    }
    return super.findLibrary(name);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.launcher

@Override
protected String findLibrary(String name) {
  if (extensionPaths == null)
    return super.findLibrary(name);
  String libName = System.mapLibraryName(name);
  for (int i = 0; i < extensionPaths.length; i++) {
    File libFile = new File(extensionPaths[i], libName);
    if (libFile.isFile())
      return libFile.getAbsolutePath();
  }
  return super.findLibrary(name);
}

代码示例来源:origin: net.sf.taverna.t2.activities/dependency-activity

@Override
  protected String findLibrary(String libname) {
    String filename = System.mapLibraryName(libname);
    File libraryFile = new File(libDir, filename);
    if (libraryFile.isFile()) {
      logger.info("Found library " + libname + ": " + libraryFile.getAbsolutePath());
      return libraryFile.getAbsolutePath();
    }
    return super.findLibrary(libname);
  }
};

代码示例来源:origin: uk.org.mygrid.taverna.processors/taverna-dependency-processor

@Override
  protected String findLibrary(String libname) {
    String filename = System.mapLibraryName(libname);
    File libraryFile = new File(libDir, filename);
    if (libraryFile.isFile()) {
      logger.info("Found library " + libname + ": " + libraryFile.getAbsolutePath());
      return libraryFile.getAbsolutePath();
    }
    return super.findLibrary(libname);
  }
};

代码示例来源:origin: org.apache.taverna.commonactivities/taverna-beanshell-activity

@Override
  protected String findLibrary(String libname) {
    String filename = System.mapLibraryName(libname);
    File libraryFile = new File(libDir, filename);
    if (libraryFile.isFile()) {
      logger.info("Found library " + libname + ": " + libraryFile.getAbsolutePath());
      return libraryFile.getAbsolutePath();
    }
    return super.findLibrary(libname);
  }
};

代码示例来源:origin: net.java.jinput/jinput

return super.findLibrary(libname);

代码示例来源:origin: org.jvnet.hudson/netx

/**
 * Return the absolute path to the native library.
 */
protected String findLibrary(String lib) {
  if (nativeDir == null)
    return null;
  String syslib = System.mapLibraryName(lib);
  File target = new File(nativeDir, syslib);
  if (target.exists())
    return target.toString();
  else {
    String result = super.findLibrary(lib);
    if (result != null)
      return result;
    return findLibraryExt(lib);
  }
}

代码示例来源:origin: org.codehaus.openxma/xmabootrt

String found = super.findLibrary(libname);
if(found!=null) return found;

代码示例来源:origin: baratine/baratine

/**
 * Returns the full library path for the name.
 */
@Override
public String findLibrary(String name)
{
 String systemName = System.mapLibraryName(name);
 ArrayList<Loader> loaders = getLoaders();
 for (int i = 0; i < loaders.size(); i++) {
  Loader loader = loaders.get(i);
  Path path = loader.getPath(systemName);
  if (path != null && path.canRead()) {
   return path.getNativePath();
  }
  
  path = loader.getPath("native/" + systemName);                                      
  if (path != null && path.canRead()) {
   return path.getNativePath();                                                      
  } 
 }
 for (int i = 0; i < _nativePath.size(); i++) {
  Path path = _nativePath.get(i);
  if (path.canRead())
   return path.getNativePath();
 }
 return super.findLibrary(name);
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.allcolor.yahp/yahp

return super.findLibrary(libname);
      return parent.findLibrary(libname);
    } else {
      return super.findLibrary(libname);
  final String c = super.findLibrary(libname);
  context.set(cpName, null);
  return c;
return super.findLibrary(libname);

代码示例来源:origin: com.caucho/resin

/**
 * Returns the full library path for the name.
 */
@Override
public String findLibrary(String name)
{
 String systemName = System.mapLibraryName(name);
 ArrayList<Loader> loaders = getLoaders();
 for (int i = 0; i < loaders.size(); i++) {
  Loader loader = loaders.get(i);
  Path path = loader.getPath(systemName);
  if (path != null && path.canRead()) {
   return path.getNativePath();
  }
  path = loader.getPath("native/" + systemName);
  if (path != null && path.canRead()) {
   return path.getNativePath();
  }
 }
 for (int i = 0; i < _nativePath.size(); i++) {
  Path path = _nativePath.get(i);
  if (path.canRead()) {
   return path.getNativePath();
  }
 }
 return super.findLibrary(name);
}

相关文章