Package net.laubenberger.bogatyr.misc

Examples of net.laubenberger.bogatyr.misc.JarLoader


          final URL[] urls = new URL[cm.getJars().size()];
          for (int ii = 0; ii < cm.getJars().size(); ii++) {
            urls[ii] = new URL("file:" + file.getParent() + '/' + cm.getJars().get(ii)); //$NON-NLS-1$
          }

          final JarLoader jl = new JarLoader(urls);

          try {
              if (null != cm.getProperties()) {
//                  cm.setProperty(new PropertyImpl(jl.getResourceAsStream(cm.getProperties())));
                  cm.setProperty(new PropertyImpl(new File(file.getParent(), cm.getProperties())));
              }

              cm.setLocalizer(new LocalizerFile(cm.getLocalizerBase(), jl, new EncodingControl()));
            cm.getLocalizer().setLocale(data.getLanguage().getLocale());

            // read data for the module
            final File tmd = new File(data.getDirectoryData(), cm.getUUID() + FileType.DATA.getExtension());
            try {
              ModuleData md = new ModuleDataImpl();
              if (tmd.exists()) {
                md = HelperXml.deserialize(tmd, ModuleDataImpl.class);
              }
              final ModuleAbstract module = (ModuleAbstract) jl.createInstance(cm.getModuleClass(), HelperArray
                  .getArray(ModuleConfig.class, ModuleData.class, Callback.class, ScalableIcon.class,
                      File.class), HelperArray.getArray(cm, md, controller,
                  new ScalableIconImpl(cm.getLogo(), cm.getLogoLarge(), jl), data.getDirectoryDB())); // TODO
                                                                          // add
                                                                          // large
View Full Code Here

TOP

Related Classes of net.laubenberger.bogatyr.misc.JarLoader

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.