ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

2
Date Submitted Thu. May. 20th, 2010 1:49 AM
Revision 1
Scripter Cloudgen
Tags compiling | JavaScript | Jsc | Rhino
Comments 0 comments
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