how do you get the path of the javascript file run through the rhino shell commandline?
eg: java -jar js.jar /path/to/this/file.js
i would like to get /path/to/this/file.js
, any ideas?
how do you get the path of the javascript file run through the rhino shell commandline?
eg: java -jar js.jar /path/to/this/file.js
i would like to get /path/to/this/file.js
, any ideas?
I do not think it is possible without some Java. jsdoc solves it by using a class that wraps rhino and inserts said path (though its a bit buggy). You can find its code (and a shell script that runs it is in the trunk): http://code.google.com/p/jsdoc-toolkit/source/browse/trunk/jsdoc-toolkit/java/src/JsRun.java