How do you get the path to the javascript file passing through the rhino shell command line

how do you get the path to the javascript file going through the rhino shell command line?

for example: java -jar js.jar / path / to / this / file.js

I would like to get /path/to/this/file.jsany ideas?

+3
source share
1 answer

I do not think this is possible without any Java. jsdoc solves it with a class that wraps a rhino and inserts the specified path (although it is a bit buggy). You can find its code (and the shell script that runs in the torso): http://code.google.com/p/jsdoc-toolkit/source/browse/trunk/jsdoc-toolkit/java/src/JsRun.java

+1

Source: https://habr.com/ru/post/1756467/


All Articles