Examples of JarClassLoader


Examples of code.from.internet.JarClassLoader

            throw new FileNotFoundException("Could not find the following file:\n"+name);
        if(jarFiles.contains(name))
            return;//already have this one...
        jarFiles.add(name);
        if (null == pluginJarClassLoader) {
            pluginJarClassLoader = new JarClassLoader(jarFile.toURI().toURL());
        } else {
            pluginJarClassLoader.addJarURL(jarFile.toURI().toURL());
        }
    }
View Full Code Here

Examples of code.from.internet.JarClassLoader

            if (null == className) {
                return null;
            }
            if (null == pluginJarClassLoader) {
                File appJarFile = new File(AFileUtilities.getPackagePath(appClass, aResourceInTheSamePackage/*"packageLocator"*/));
                pluginJarClassLoader = new JarClassLoader(appJarFile.toURI().toURL());
            }
            plugInClass = pluginJarClassLoader.loadClass(className);
        } catch(ClassNotFoundException ex){
            throw new ClassNotFoundException("Loaded jar files:\n"+dumpJarFiles(),ex);
        }
View Full Code Here

Examples of code.from.internet.JarClassLoader

                confFolderName = (new File("")).getAbsolutePath() + System.getProperty("file.separator");
                nimpHomeNotDefined = true;
            }
            File appJarFile = new File(AFileUtilities.getPackagePath(classInMainPackage, "packageLocator"));
            try {
                pluginJarClassLoader = new JarClassLoader(appJarFile.toURI().toURL());
            } catch (MalformedURLException ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
            }
            this.appName = appName;
        }
View Full Code Here

Examples of code.from.internet.JarClassLoader

            if (uniqueNames.size() >= 1) {
                for (String jarName : uniqueNames) {
                    File jarFile = new File(jarName);
                    if (null == pluginJarClassLoader) {
                        pluginJarClassLoader = new JarClassLoader(jarFile.toURI().toURL());
                    } else {
                        pluginJarClassLoader.addJarURL(jarFile.toURI().toURL());
                    }
                }
            } else {
                File appJarFile = new File(AFileUtilities.getPackagePath(classInMainPackage, "packageLocator"));
                pluginJarClassLoader = new JarClassLoader(appJarFile.toURI().toURL());
            }

            names = ACommandLineUtilities.getArgValues(p.args, p.argSpecs, ARG_ADD_TERMINAL_MANAGER, null);
            if (0 == names.size()) {
                //look for app default conf
View Full Code Here

Examples of code.from.internet.JarClassLoader

        }

        public void run() {
            try {
                SmartCardTask task = null;
                JarClassLoader cl = null;
                try {
                    if (null == out) {
                        return;
                    }
                    cl = new JarClassLoader(out.toURI().toURL());
                    InputStream reg = cl.getResourceAsStream("SmartCardTaskRegistrator");
                    InputStreamReader isr = new InputStreamReader(reg);
                    BufferedReader in = new BufferedReader(isr);
                    String className = in.readLine();
                    String methodName = in.readLine();
                    in.close();
                    task = (SmartCardTask) cl.invokeClassStaticMethod(className, methodName);
                } catch (ClassNotFoundException ex) {
                    Logger.getLogger(CardReaderManagerView.class.getName()).log(Level.SEVERE, null, ex);
                } catch (NoSuchMethodException ex) {
                    Logger.getLogger(CardReaderManagerView.class.getName()).log(Level.SEVERE, null, ex);
                }
View Full Code Here

Examples of com.jdotsoft.jarloader.JarClassLoader

  public static void main(String[] args) {

    // Der JarClassLoader kann auch native Bibliotheken aus einem Archiv
    // laden, wenn das nötig ist.
    try {
      new JarClassLoader().invokeMain(
          "com.googlecode.jumpnevolve.game.Jumpnevolve", args);
    } catch (Throwable e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of com.jdotsoft.jarloader.JarClassLoader

  /**
   * @param args Kommandozeilenargumente
   */
  public static void main(String[] args) {
    JarClassLoader jcl = new JarClassLoader();
        try {
            jcl.invokeMain("com.googlecode.jumpnevolve.game.Jumpnevolve", args);
        } catch (Throwable e) {
            e.printStackTrace();
        }
  }
View Full Code Here

Examples of com.jdotsoft.jarloader.JarClassLoader

     * The main as invoked by the JRE.
     *
     * @param args the arguments
     */
    public static void main(String[] args) {
        JarClassLoader jcl = new JarClassLoader();
        try {
            jcl.invokeMain("de.mnl.srcpd4cu.Srcpd4Cu", args);
        } catch (Throwable e) {
            e.printStackTrace();
        }
    } // main()
View Full Code Here

Examples of com.jdotsoft.jarloader.JarClassLoader

      System.setOut(ps);
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    }
   
    JarClassLoader loader = new JarClassLoader();
    try {
      if( args.length>0 && args[0].startsWith("net.geco") ) { //$NON-NLS-1$
        loader.invokeMain(args[0], Arrays.copyOfRange(args, 1, args.length));
      } else {
        loader.invokeMain("net.geco.Geco", args); //$NON-NLS-1$
      }
    } catch (ClassNotFoundException e) {
      JOptionPane.showMessageDialog(
          null,
          Messages.getString("GecoLoader.AppNotFoundWarning"//$NON-NLS-1$
View Full Code Here

Examples of com.sun.enterprise.util.JarClassLoader

                                                    "lib"+ // NOI18N
                                                    File.separator;
            classPath.add(as_lib_root + "javaee.jar"); // NOI18N
        }

        JarClassLoader jcl = new JarClassLoader();
        // toURI().toURL() takes care of all the escape characters in the
        // absolutePath. The toURI() method encodes all escape characters. Since
        // EJBClassLoader does not decode these urls here only toURL() is used.
        // Once this issue is fixed in EJBClassloader we can change it to
        // toURI().toURL()
        for (String path : classPath)
            jcl.appendURL(new File(path));
        return jcl;
    }
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.