Exemplo n.º 1
0
 @Override
 public void resetScriptLoader(Configuration oteConfiguration, String[] classPaths)
     throws Exception {
   List<URL> urls = new ArrayList<>();
   if (oteConfiguration != null) {
     for (ConfigurationItem item : oteConfiguration.getItems()) {
       File file = serverRuntimeCache.get(item.getSymbolicName(), item.getMd5Digest());
       if (file != null) {
         urls.add(file.toURI().toURL());
       }
     }
   }
   URL[] urlArray = urls.toArray(new URL[urls.size() + classPaths.length]);
   URL[] urlClassPaths = Lib.getUrlFromString(classPaths);
   System.arraycopy(urlClassPaths, 0, urlArray, urls.size(), urlClassPaths.length);
   scriptClassLoader =
       new OseeURLClassLoader("Script ClassLoader", urlArray, ExportClassLoader.getInstance());
 }
Exemplo n.º 2
0
 @Override
 public Class<?> loadFromRuntimeLibraryLoader(String clazz) throws ClassNotFoundException {
   return ExportClassLoader.getInstance().loadClass(clazz);
 }