Beispiel #1
0
 /** Method invoked by Ant to actually run the task */
 public void execute() throws BuildException {
   // create the list of arguments for the rhino shell
   String[] arguments = createArguments();
   try {
     Main.main(arguments);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Beispiel #2
0
  public static void main(String[] args) {
    String[] jsargs = {"-j=" + args[0]};

    String[] allArgs = new String[jsargs.length + args.length];
    System.arraycopy(args, 0, allArgs, 0, args.length);
    System.arraycopy(jsargs, 0, allArgs, args.length, jsargs.length);

    org.mozilla.javascript.tools.shell.Main.main(allArgs);
  }
 /** Will output the console jsdoc creation logs to log4j. */
 public static void setConsoleOuput() {
   Log4jOutputStream l4jos = new Log4jOutputStream(LOGGER, Level.INFO);
   PrintStream ps = new PrintStream(l4jos, true);
   Main.setOut(ps);
 }