I'm currently inserting text like this before compiling my script:
"Bar = Packages." + foo.Bar.class.getName() + ";\n" + theScriptToRun
as a way to "alias" the Bar class. I'd prefer not to do it this way. I'm
currently trying to do this:
final FunctionObject functionObject = new FunctionObject("Bar",
Bar.class.getConstructor(), scope);
ScriptableObject.putProperty(scope, "Bar", functionObject);
The first line is failing with:
org.mozilla.javascript.EvaluatorException: Construction of objects of type
"foo.Bar" is not supported.
My ClassShutter allows access to foo.Bar. Anyone know what the problem is,
or how I can "import" classes into the top-level scope?
Thanks.
--Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:da...@6degrees.com