sbin/res/jsdoc/java/src/JsRun.java
author durandn
Fri, 18 Sep 2015 15:08:36 +0200
changeset 1056 3d19cbe56fcb
parent 520 fe008e95a716
permissions -rw-r--r--
fixed error when clicking annotation from an user that isn't in the api
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
520
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     1
/**
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     2
 * A trivial bootstrap class that simply adds the path to the
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     3
 * .js file as an argument to the Rhino call. This little hack
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     4
 * allows the code in the .js file to have access to it's own 
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     5
 * path via the Rhino arguments object. This is necessary to 
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     6
 * allow the .js code to find resource files in a location 
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     7
 * relative to itself.
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     8
 *
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
     9
 * USAGE: java -jar jsrun.jar path/to/file.js
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    10
 */
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    11
public class JsRun {
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    12
	public static void main(String[] args) {
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    13
		String[] jsargs = {"-j="+args[0]};
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    14
		
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    15
		String[] allArgs = new String[jsargs.length + args.length];
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    16
		System.arraycopy(args, 0, allArgs, 0, args.length);
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    17
		System.arraycopy(jsargs, 0, allArgs, args.length ,jsargs.length);
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    18
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    19
		org.mozilla.javascript.tools.shell.Main.main(allArgs);
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    20
    }
fe008e95a716 added jsdoc support, and a script to generate the docs.
hamidouk
parents:
diff changeset
    21
}