| author | ymh <ymh.work@gmail.com> |
| Sun, 12 Nov 2017 22:07:33 +0100 | |
| changeset 1071 | 02c04d2c8fd8 |
| parent 520 | fe008e95a716 |
| permissions | -rw-r--r-- |
|
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 jsdebug.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 JsDebugRun { |
|
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.debugger.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 |
} |