String resolvedFile = getResolvedFileName(file);
String resolvedFile = jarFileResolver.getResolvedFileName(file);
    void configureClasspath(String home, Classpath classpath, InputStream config, String[] args, String mode) {        // Any files referenced in start.config that don't exist or cannot be resolved        // are placed in this list.        List invalidJars = new ArrayList();        try {            BufferedReader cfg = new BufferedReader(new InputStreamReader(config, "ISO-8859-1"));            Version java_version = new Version(System.getProperty("java.version"));            Version ver = new Version();            // JAR's already processed            Hashtable done = new Hashtable();            String line = cfg.readLine();            while (line != null) {                try {                    if ((line.length() > 0) && (!line.startsWith("#"))) {                        if (_debug)                            System.err.println(">" + line);                        StringTokenizer st = new StringTokenizer(line);                        String subject = st.nextToken();                        boolean include_subject = true;                        String condition = null;                        while (include_subject && st.hasMoreTokens()) {                            condition = st.nextToken();                            if (condition.equals("never")) {                                include_subject = false;                            } else if (condition.equals("always")) {                            } else if (condition.equals("available")) {                                String class_to_check = st.nextToken();                                include_subject &= isAvailable(class_to_check, classpath);                            } else if (condition.equals("!available")) {                                String class_to_check = st.nextToken();                                include_subject &= !isAvailable(class_to_check, classpath);                            } else if (condition.equals("java")) {                                String operator = st.nextToken();                                String version = st.nextToken();                                ver.parse(version);                                include_subject                                        &= (operator.equals("<") && java_version.compare(ver) < 0)                                        || (operator.equals(">") && java_version.compare(ver) > 0)                                        || (operator.equals("<=") && java_version.compare(ver) <= 0)                                        || (operator.equals("=<") && java_version.compare(ver) <= 0)                                        || (operator.equals("=>") && java_version.compare(ver) >= 0)                                        || (operator.equals(">=") && java_version.compare(ver) >= 0)                                        || (operator.equals("==") && java_version.compare(ver) == 0)                                        || (operator.equals("!=") && java_version.compare(ver) != 0);                            } else if (condition.equals("nargs")) {                                String operator = st.nextToken();                                int number = Integer.parseInt(st.nextToken());                                include_subject &= (operator.equals("<") && args.length < number)                                        || (operator.equals(">") && args.length > number)                                        || (operator.equals("<=") && args.length <= number)                                        || (operator.equals("=<") && args.length <= number)                                        || (operator.equals("=>") && args.length >= number)                                        || (operator.equals(">=") && args.length >= number)                                        || (operator.equals("==") && args.length == number)                                        || (operator.equals("!=") && args.length != number);                            } else if (condition.equals("mode")) {                                String operator = st.nextToken();                                String m = st.nextToken();                                include_subject &= (operator.equals("==") && mode.equals(m))                                        || (operator.equals("!=") && (!mode.equals(m)));                            } else {                                System.err.println("ERROR: Unknown condition: " + condition);                            }                        }                        String file =                                subject.startsWith("/") ?                                subject.replace('/', File.separatorChar)                                : home + File.separatorChar + subject.replace('/', File.separatorChar);                        if (_debug)                            System.err.println("subject="                                    + subject                                    + " file="                                    + file                                    + " condition="                                    + condition                                    + " include_subject="                                    + include_subject);                        // ok, should we include?                        if (subject.endsWith("/*")) {                            // directory of JAR files                            File extdir = new File(file.substring(0, file.length() - 1));                            File[] jars = extdir.listFiles(new FilenameFilter() {                                public boolean accept(File dir, String name) {                                    String namelc = name.toLowerCase();                                    return namelc.endsWith(".jar") || name.endsWith(".zip");                                }                            });                            if (jars != null) {                                for (int i = 0; i < jars.length; i++) {                                    String jar = jars[i].getCanonicalPath();                                    if (!done.containsKey(jar)) {                                        if (include_subject) {                                            done.put(jar, jar);                                            if (classpath.addComponent(jar) && _debug)                                                System.err.println("Adding JAR from directory: " + jar);                                        }                                    }                                }                            }                        } else if (subject.endsWith("/")) {                            // class directory                            File cd = new File(file);                            String d = cd.getCanonicalPath();                            if (!done.containsKey(d)) {                                done.put(d, d);                                if (include_subject) {                                    if (classpath.addComponent(d) && _debug)                                        System.err.println("Adding directory: " + d);                                }                            }                        } else if (subject.toLowerCase().endsWith(".class")) {                            // Class                            _classname = subject.substring(0, subject.length() - 6);                        } else {                            // single JAR file                            String resolvedFile = getResolvedFileName(file);                            File f = new File(resolvedFile);                            if (include_subject) {                                if (!f.exists()) {                                    invalidJars.add(f.getAbsolutePath());                                }                            }                            String d = f.getCanonicalPath();                            if (!done.containsKey(d)) {                                if (include_subject) {                                    done.put(d, d);                                    if (classpath.addComponent(d) && _debug)                                        System.err.println("Adding single JAR: " + d);                                }                            }                        }                    }                } catch (Exception e) {                    if (_debug) {                        System.err.println(line);                        e.printStackTrace();                    }                }                line = cfg.readLine();            }        } catch (Exception e) {            e.printStackTrace();        }        // Print message if any files from start.config were added        // to the classpath but they could not be found.        if (invalidJars.size() > 0) {            Iterator it = invalidJars.iterator();            StringBuffer nonexistentJars = new StringBuffer();            while (it.hasNext()) {                String invalidJar = (String) it.next();                nonexistentJars.append("    " + invalidJar + "\n");            }            System.err.println(                "\nWARN: The following JAR file entries from '"                + startConfigFileName + "' aren't available (this may NOT be a "                + "problem):\n"                + nonexistentJars            );        }    }