ownThread = Thread.currentThread();
    public void run() {        // Here, we are running in the CommandShell (main) Thread        // so, we can register ourself as the current shell        // (it will also be the current shell for all children Thread)        try {            ShellUtils.getShellManager().registerShell(this);        } catch (NameNotFoundException e1) {            e1.printStackTrace();        }        // Run commands from the JNode commandline first        final String cmdLine = (String) AccessController                .doPrivileged(new GetPropertyAction("jnode.cmdline", ""));        final StringTokenizer tok = new StringTokenizer(cmdLine);        while (tok.hasMoreTokens()) {            final String e = tok.nextToken();            try {                if (e.startsWith(command)) {                    final String cmd = e.substring(command.length());                    currentPrompt = prompt();                    out.println(currentPrompt + cmd);                    processCommand(cmd);                }            } catch (Throwable ex) {                ex.printStackTrace(err);            }        }        final String user_home = (String) AccessController.doPrivileged(new GetPropertyAction("user.home", ""));        AccessController.doPrivileged(new PrivilegedAction() {            public Object run() {                try {                    final File shell_ini = new File(user_home + "/shell.ini");                    if(shell_ini.exists())                    executeFile(shell_ini);                } catch(IOException ioe){                    ioe.printStackTrace();                }                return null;            }        });        // Now become interactive        while (!isExitted()) {            try {                synchronized (this) {                    // Catch keyboard events                    isActive = true;                    currentPrompt = prompt();                    out.print(currentPrompt);                    currentLine.start();                    // wait until enter is hit                    threadSuspended = true;                    while (threadSuspended) {                        wait();                    }                    String line = currentLine.getContent().trim();                    if (line.length() > 0) {                        processCommand(line);                    }                    // if (currentLine.trim().equals("halt")) halt = true;                    historyIndex = -1;                    if (VmSystem.isShuttingDown()) {                        exitted = true;                    }                }            } catch (Throwable ex) {                ex.printStackTrace(err);            }        }    }