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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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