@SuppressWarnings("deprecation")
	private void processExternalCommand(final String[] tokens) {
        // FIXME: searching broken for mixed case-sensitive / insensitive systems
        if (!Enigma.isFileSystemCaseSensitive(env.getCurrentPath()))
            tokens[0] = tokens[0].toLowerCase();
        File match = null;
        
        // look for literal path
        File possible = Enigma.resolvePath(tokens[0]);
        if (possible.getName().indexOf(".") == -1) {
            match = scanDirectoryForExecutable(possible.getParentFile(), possible.getName());
        }
        else if (possible.exists()) {
            if (getInvokerFor(possible) != null)
                match = possible;
        }
        
        // if not found yet, scan path
        String path = env.getProperty("path");
        if (match == null && path != null) {
            StringTokenizer st = new StringTokenizer(path, System.getProperty("path.separator"));
            while (st.hasMoreTokens()) {
                File dir = Enigma.resolvePath(st.nextToken().trim());
                match = scanDirectoryForExecutable(dir, tokens[0]);
            }
        }
        
        if (match == null) {
            Util.println(Util.msg(getClass(), "command.not.found", new String[] { tokens[0] }));
            Util.println();
            return;
        }
        final String className = "enigma.shells.commandline.commands.Exec";
        tokens[0] = getInvokerFor(match) + match.getPath();
        childThread = new Thread() {
            public void run() {
                JavaProgramLoader.runClass(className, tokens);
            }
        };
        childThread.start();
        try {
            childThread.join();
        }
        catch (InterruptedException e) {
            childThread.stop();
        }
    }