public void buildClassList() {
        String classPath = System.getProperty("java.class.path");
        String classPathSeparator = File.pathSeparator;
        // add the current dir to find more plugins
        classPath = mFrame.getFreemindBaseDir() + classPathSeparator
                + classPath;
        logger.info("Classpath for plugins:" + classPath);
        // to remove duplicates
        HashSet foundPlugins = new HashSet();
        StringTokenizer st = new StringTokenizer(classPath, classPathSeparator);
        while (st.hasMoreTokens()) {
            String classPathEntry = st.nextToken();
            File classPathFile = new File(classPathEntry);
            try {
                String key = classPathFile.getCanonicalPath();
                if (foundPlugins.contains(key))
                    continue;
                logger.fine("looking for plugins in " + key);
                foundPlugins.add(key);
            } catch (IOException e) {
                // TODO Auto-generated catch block
                freemind.main.Resources.getInstance().logException(e);
            }
            if (classPathFile.exists()) {
                String lowerCaseFileName = classPathEntry.toLowerCase();
                if (lowerCaseFileName.endsWith(".jar")) {
                    logger.fine("searching for plugins in: " + classPathEntry);
                    addClassesFromZip(CLASS_LIST, classPathFile);
                } else if (lowerCaseFileName.endsWith(".zip")) {
                    logger.fine("searching for plugins in: " + classPathEntry);
                    addClassesFromZip(CLASS_LIST, classPathFile);
                } else if (classPathFile.isDirectory()) {
                    logger.fine("searching for plugins in: " + classPathEntry);
                    addClassesFromDir(CLASS_LIST, classPathFile, classPathFile,
                            0);
                }
            }
        }

    }