Examples of addConstituent()


Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

        try {
            final ClassRealm newRealm = this.classWorld.newRealm(location.getRealm(), getClass().getClassLoader());
            final URI[] classpathLocations = location.getClasspathLocations();
            for (URI uri : classpathLocations) {
                newRealm.addConstituent(uri.toURL());
            }

        } catch (DuplicateRealmException e) {
            // Happens for #classpath realms ...
        } catch (MalformedURLException e) {
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
        ClassWorld cw = new ClassWorld();
        ClassRealm realm = cw.newRealm("http://x.as?2");       
        realm.addConstituent(new File("bin/").toURI().toURL());
        ClassLoader classLoader = realm.getClassLoader();
       
        Class<?> loadClass = classLoader.loadClass("net.xeoh.plugins.base.Plugin");
        System.out.println(loadClass);
       
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

                URL[] urls = parseGlobURLs(urlspec);
                for (int j=0; j<urls.length; j++) {
                    if (trace) {
                        log.trace("Adding constituent: " + urls[j]);
                    }
                    realm.addConstituent(urls[j]);
                }
            }
        }
       
        ImportPackageConfig[] imports = config.getImportPackageConfig();
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

    public void registerLocation(AbstractClassPathLocation location) {
        if (!this.initializedProperly) return;

        try {
            final ClassRealm newRealm = this.classWorld.newRealm(location.getRealm(), getClass().getClassLoader());
            newRealm.addConstituent(location.getLocation().toURL());
        } catch (DuplicateRealmException e) {
            // Happens for #classpath realms ...
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

                URL[] urls = parseGlobURLs(urlspec);
                for (int j=0; j<urls.length; j++) {
                    if (trace) {
                        log.trace("Adding constituent: " + urls[j]);
                    }
                    realm.addConstituent(urls[j]);
                }
            }
        }
       
        ImportPackageConfig[] imports = config.getImportPackageConfig();
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

      if (libPathFile.isDirectory()) {
        File[] files = libPathFile.listFiles();

        for (File file : files) {
          classRealm.addConstituent(file.toURI().toURL());
        }
      }
    }
  }
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

              }
            }
          }
        }

        classRealm.addConstituent(new File(line).toURI().toURL());
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

    ClassRealm classRealm = getMainRealm();

    List<URL> deps = pomReader.calculateDependencies(groupId, artifactId, version, classifier);

    for (URL dep : deps) {
      classRealm.addConstituent(dep);
    }
  }

  /**
   * Resolves dependencies for specified pom maven2 dependencies file.
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

      ClassRealm classRealm = getMainRealm();

      List<URL> deps = pomReader.calculateDependencies(depsFile, ignore);

      for (URL dep : deps) {
        classRealm.addConstituent(dep);
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.addConstituent()

    File compilerJar = CommonUtil.getCompilerJar();

    if (compilerJar != null) {
      try {
        ClassRealm mainRealm = getMainRealm();
        mainRealm.addConstituent(compilerJar.toURI().toURL());
        //System.out.println("Using Java compiler: " + compilerJar);
      }
      catch (Exception e) {
        throw new LauncherException(e);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.