if(pluginRegistry.containsKey(filename) || ioRegistry.containsKey(filename)) {  System.err.println("Warning: plugin with name [" + filename + "] already loaded.  Ignoring."); continue; }
	public void load(String directory) {		if(directory != null) {			PLUGIN_DIRECTORY = directory;		}				// Look for *.class files in a particular directory		// and load them in using createPlugin		File dir = new File(PLUGIN_DIRECTORY);		if (!dir.exists() || dir.list() == null) {			// File or directory does not exist			System.out.println("The plugin directory [" + PLUGIN_DIRECTORY + "] was not found.");			return;		}				FilenameFilter filter = new FilenameFilter() {			public boolean accept(File dir, String name) {				return name.endsWith(".class");			}		};				String [] children = dir.list(filter);				for (int i = 0; i < children.length; i++) {			// Get filename of file or directory			String filename = children[i].substring(0, children[i].length()-6);			if (filename.indexOf('$')== -1) {				// we have found a file corresponding to a public class				try {					NV2DPlugin s = createPlugin(filename, PLUGIN_DIRECTORY);					System.out.println(" * " + filename + " plug-in loaded");				} catch(PluginNotCreatedException e) {					// System.err.println("  There was an error loading the plugin [" + filename + "]");					// System.err.println("  -> " + e.toString());				} catch(ClassCastException e) {					// System.err.println("  There was an error loading the plugin [" + filename + "]");					// System.err.println("  -> The file is not an NV2D plugin.");				}			}		}	}