continue; }  if(pluginRegistry.containsKey(pname) || ioRegistry.containsKey(pname)) {  System.err.println("Warning: plugin with name [" + pname + "] already loaded.  Ignoring.");
	public void loadFromJar(ClassLoader parent, String url) throws JARAccessException {		URLClassLoader loader = null;		String pname = null;		String fullname = null;				// the java load classes have some syntax peculiarties, namely that		// to load a jar file, the URL must begin with 'jar:' and end with '!/'		if(!url.startsWith("jar:")) {			url = new String("jar:" + url);		}				if(!url.endsWith(".jar!/")) {			url = new String(url + "!/");		}				// check if the url is allowed by the _securityList		if(!isValidLocation(url)) {			String errmsg = "The url for the JAR file is not allowed by the security manager.  Please add it's path in the security manager.";			System.err.println(errmsg);			throw new JARAccessException(errmsg);		}				try {			loader = new URLClassLoader(new URL[] { new URL(url) }, parent);		} catch (MalformedURLException ex) {			String errmsg = "The url for the JAR file [" + url + "] is malformed";			System.err.println(errmsg);			System.err.println(ex.toString());			throw new JARAccessException(errmsg);		}		Enumeration e = JarListing.getPluginListing(url, PLUGIN_DIRECTORY);		if(e == null) {			throw new JARAccessException("No plugins found");		}		for(e = e; e.hasMoreElements();) {			boolean success = true;			try {				// pname = ((String) e.nextElement()).replace('/', '.');				String enum_str = (String) e.nextElement();				pname = extractName(enum_str);				fullname = extractPath(enum_str);								if(pname == null || pname.length() < 1 || pname.indexOf("$") >= 0) {					continue;				}				// Load class from class loader. argv[0] is the name of the class to be loaded				Class c = loader.loadClass(fullname);				// Create an instance of the class just loaded				NV2DPlugin s = createPlugin(c, pname);			} catch (ClassNotFoundException ex) {				System.err.println("  The plugin [" + pname + "] could not be found");				System.err.println(ex.toString());				success = false;			} catch(PluginNotCreatedException ex) {				// System.err.println("  There was an error loading the plugin [" + pname + "]");				// System.err.println("  -> " + ex.toString());				success = false;			} catch(ClassCastException ex) {				// System.err.println("  There was an error loading the plugin [" + pname + "]");				// System.err.println("  -> The file is not an NV2D plugin.");				success = false;			}			if(success) {				System.out.println("Loaded plugin [" + pname + "]");			}		}	}