index.js
function runCMD(options, cb) {
    if (options.cb) {
        cb = options.cb;
    }
    var args = ["-cp", ".", "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "TerminalRunner"];
    args.push(options.name);
    args.push(options.program);
    args.push(options.timeLimit);
    args.push(options.input);


    runProc(args, function() {
        observer.emit("runner.finished", options);
        cb.apply(this, arguments);
    });
}
function runCMD(options, cb) {
    if (options.cb) {
        cb = options.cb;
    }
    var args = ["-cp", ".", "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "TerminalRunner"];
    args.push(options.name);
    args.push(options.program);
    args.push(options.timeLimit);
    args.push(options.input);


    runProc(args, function() {
        observer.emit("runner.finished", options);
        cb.apply(this, arguments);
    });
}
function runCMD ( options , cb ) { if ( options . cb ) { cb = options . cb ; } var args = [ "-cp" , "." , "-XX:+TieredCompilation" , "-XX:TieredStopAtLevel=1" , "TerminalRunner" ] ; args . push ( options . name ) ; args . push ( options . program ) ; args . push ( options . timeLimit ) ; args . push ( options . input ) ; runProc ( args , function ( ) { observer . emit ( "runner.finished" , options ) ; cb . apply ( this , arguments ) ; } ) ; }
Run java program in TerminalRunner
@param  {Object} options an object containing all prgram needed configuration
- {String}   name    name of class
- {String}   program source code of JavaClass with public class [name]
- {String}   input   The program's input stream if needed
@param  {Function} cb      callback when complete
Run java program in TerminalRunner