private void doWelcome(Session session) {
        if (! session.isInteractive()) {
            return;
        }
        File confDir = getConfigDirectory();
        File welcomeFile = new File(confDir, ".welcome");
        if (welcomeFile.exists()) {
            return;
        }
        /*
         * Create the welcome file since we are going to welcome them!
         */
        try {
            welcomeFile.createNewFile();
        }
        catch (IOException e) {
            System.err.println("WARNING: Failed to create " + welcomeFile 
                + ": " + e.getMessage());
            return;
        }
        /*
         * Here's a hack.  The ".welcome" file is a recent change to jsqsh, and
         * we don't want to do the whole welcome thing if an existing jsqsh user
         * already has a ~/.jsqsh but doesn't have a .welcome file in it. To avoid
         * this, check to see if drivers.xml is older than the date at which this
         * comment was written and don't do the setup activities.
         */
        File driversFile = new File(confDir, "drivers.xml");
        if (driversFile.exists())
        {
            long lastModified = driversFile.lastModified();
            /*
             * Directory was created prior to "now" (when I am typing this comment),
             * so pretend the welcome was done
             */
            if (lastModified < 1392411017075L) {
                return;
            }
        }
        HelpTopic welcome = helpManager.getTopic("welcome");
        System.out.println(welcome.getHelp());
        session.out.println();
        session.out.println("You will now enter the jsqsh setup wizard.");
        try {
            getConsole().readline("Hit enter to continue: ", false);
            Command command = session.getCommandManager().getCommand("\\setup");
            command.execute(session, new String [] { });
        }
        catch (Exception e) {
            /* NOT SURE WHAT TO DO HERE */
            e.printStackTrace();
        }
    }
private void doWelcome(Session session) {
        if (! session.isInteractive()) {
            return;
        }
        File confDir = getConfigDirectory();
        File welcomeFile = new File(confDir, ".welcome");
        if (welcomeFile.exists()) {
            return;
        }
       
        try {
            welcomeFile.createNewFile();
        }
        catch (IOException e) {
            System.err.println("WARNING: Failed to create " + welcomeFile 
                + ": " + e.getMessage());
            return;
        }
       
        File driversFile = new File(confDir, "drivers.xml");
        if (driversFile.exists())
        {
            long lastModified = driversFile.lastModified();
           
            if (lastModified < 1392411017075L) {
                return;
            }
        }
        HelpTopic welcome = helpManager.getTopic("welcome");
        System.out.println(welcome.getHelp());
        session.out.println();
        session.out.println("You will now enter the jsqsh setup wizard.");
        try {
            getConsole().readline("Hit enter to continue: ", false);
            Command command = session.getCommandManager().getCommand("\\setup");
            command.execute(session, new String [] { });
        }
        catch (Exception e) {
           
            e.printStackTrace();
        }
    }
private void dowelcome(session session) { if (! session.isinteractive()) { return; } file confdir = getconfigdirectory(); file welcomefile = new file(confdir, ".welcome"); if (welcomefile.exists()) { return; } try { welcomefile.createnewfile(); } catch (ioexception e) { system.err.println("warning: failed to create " + welcomefile + ": " + e.getmessage()); return; } file driversfile = new file(confdir, "drivers.xml"); if (driversfile.exists()) { long lastmodified = driversfile.lastmodified(); if (lastmodified < 1392411017075l) { return; } } helptopic welcome = helpmanager.gettopic("welcome"); system.out.println(welcome.gethelp()); session.out.println(); session.out.println("you will now enter the jsqsh setup wizard."); try { getconsole().readline("hit enter to continue: ", false); command command = session.getcommandmanager().getcommand("\\setup"); command.execute(session, new string [] { }); } catch (exception e) { e.printstacktrace(); } }