Package code.from.internet

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


            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

                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

            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

        }

        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

TOP

Related Classes of code.from.internet.JarClassLoader

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.