Package org.earth3d.jearth.plugins

Examples of org.earth3d.jearth.plugins.PluginClassLoader


   
    List<String> depends = getDependencyList(jarFile);
   
    // create a classloader for this plugin
    // add main classloader
    PluginClassLoader pcl = new PluginClassLoader(new URL[] {file.toURL()},
        this.getClass().getClassLoader());
   
    // add it to the list
    classloaderlist.put(file.getName(), pcl);
   
    // add all dependend classloaders
    for(String parent : depends) {
      pcl.addParent(classloaderlist.get(parent));
    }
   
    // start the plugin class
    System.out.println("Open jarfile");
    Properties jprop = getJarProperties(jarFile);
    String startClass = jprop.getProperty("pluginclass");
    System.out.println("Start plugin");
    Earth3dPlugin ep = (Earth3dPlugin) pcl.findClass(startClass).newInstance();
    ep.setConfiguration(conf);
    ep.setExtensionManager(extensionManager);
    ep.init();
   
    System.out.println("Started plugin");
View Full Code Here

TOP

Related Classes of org.earth3d.jearth.plugins.PluginClassLoader

Copyright © 2018 www.massapicom. 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.