How to load .js files into a Rhino context in Java
Here is my situation: I have access to a Rhino Context object in a Java class. I want to read in a bunch of .js files and pass them along to the Rhino context to have them evaluated. I'm not really interested in having the functions in the .js files available in the scripting context so much as I am in just having the variables that are declared in the .js files available (this is a tooling validation kind of issue). Ideally I would read in and try to evaluate each file all at once, not line by line. I noticed there is a method in Context (see Rhino API ) called evaluateReader() . My first