/** * <p> * This loader will delegate to the context classloader when possible, * otherwise it will attempt to resolve resources using any jar files * found in the "lib/" directory in the specified instance directory. * If the instance directory is not specified (=null), SolrResourceLoader#locateInstanceDir will provide one. * <p> */ public SolrResourceLoader( String instanceDir, ClassLoader parent, Properties coreProperties ) { if( instanceDir == null ) { this.instanceDir = SolrResourceLoader.locateSolrHome(); } else{ this.instanceDir = normalizeDir(instanceDir); } log.info("Solr home set to '" + this.instanceDir + "'"); this.classLoader = createClassLoader(null, parent); addToClassLoader("./lib/", null); this.coreProperties = coreProperties; }
File f = FileUtils.resolvePath(new File(dir), libDir); log.info( "loading shared library: "+f.getAbsolutePath() ); libLoader = SolrResourceLoader.createClassLoader(f, null);