Disabling extensions

Harshad RJ harshad.rj at gmail.com
Wed Mar 19 20:38:03 UTC 2014


Hi,

How do I disable some or all of the nashorn extensions? I am
especially interested in disabling the creation of attributes such as:
exit, quit, load, etc.

I can confirm that this works:

  jsContext = jsEngine.getContext()
  jsContext.removeAttribute("exit", jsContext.getAttributesScope("exit"))

However, it would be nicer to disable their creation itself.

thanks,
-- 
Harshad RJ


More information about the nashorn-dev mailing list