File top=environmentContext.getSharedLibDir(); if(top!=null&&top.exists()&&top.isDirectory()){  File[] files=top.listFiles(); if(files!=null){ for(int i=0;i<files.length;i++){ if(files[i].isDirectory()){ Descriptor root=DescriptorFactory.buildDescriptor(files[i]); if(root!=null){ SharedLibrary sl=root.getSharedLibrary(); if(sl!=null){ try{ classLoaderService.addSharedLibrary(files[i],sl); }catch(MalformedURLException e){ log.error("Failed to initialize sharted library",e);
File top = environmentContext.getSharedLibDir(); if (top != null && top.exists() && top.isDirectory()) {  File[] files = top.listFiles(); if (files != null) { for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { File dir = FileVersionUtil.getLatestVersionDirectory(files[i]); if (dir != null) { Descriptor root = DescriptorFactory.buildDescriptor(dir); if (root != null) { SharedLibrary sl = root.getSharedLibrary(); if (sl != null) { try { container.getRegistry().registerSharedLibrary(sl, dir); } catch (Exception e) { log.error("Failed to initialize sharted library", e); }
    protected void buildSharedLibs(){        // walk through shared libaries and add then to the ClassLoaderService        File top=environmentContext.getSharedLibDir();        if(top!=null&&top.exists()&&top.isDirectory()){            // directory structure is sharedlibraries/<lib name>stuff ...            File[] files=top.listFiles();            if(files!=null){                for(int i=0;i<files.length;i++){                    if(files[i].isDirectory()){                        Descriptor root=DescriptorFactory.buildDescriptor(files[i]);                        if(root!=null){                            SharedLibrary sl=root.getSharedLibrary();                            if(sl!=null){                                try{                                    classLoaderService.addSharedLibrary(files[i],sl);                                }catch(MalformedURLException e){                                    log.error("Failed to initialize sharted library",e);                                }                            }                        }                    }                }            }        }    }