|
|
|
Below are revisions for this snippet.
Jsc command for compiling Rhino Javascript
If you are using Rhino, to compile a JavaScript file into java byte code invoke the following class
org.mozilla.javascript.tools.jsc.Main
In most of the time, if we want to compile the JavaScript file, we should start a Rhino session in order to invoke the org.mozilla.javascript.tools.jsc.Main class. This may be trivial if we have to compile a batch of files at a time. Thus, it's better if we can have a command instead of invoking a jar class file. To see how this can be done, please go to Compilation of Javascript File




