« Return to Thread: Can I disable the ability to call java code from rhino?

Re: Can I disable the ability to call java code from rhino?

by Norris Boyd-2 :: Rate this Message:

Reply to Author | View in Thread

On Jan 22, 5:07 am, keith <keithgchap...@...> wrote:

> Hi,
>
> I understand that I can call Java code directly from Within Rhino. Is
> there a configuration setting or something that can disable this
> feature?
>
> for e.g I dont want a script having
> java.lang.System.exit(0);
> bring down the whole system. Is there anyway I can control this.
>
> Thanks,
> Keith.

(Please use mozilla.dev.tech.js-engine.rhino in the future.)

Take a look at the following method and class:

http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/Context.html#setClassShutter(org.mozilla.javascript.ClassShutter)
http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/ClassShutter.html

--N
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine

 « Return to Thread: Can I disable the ability to call java code from rhino?