Make sure that test.js is loaded via URLReader or load primitive. i.e.,
nashorn engine should load the script pointed via URL - if you pass
FileReader or loaded content to engine.eval, Nashorn will treat it as
sandboxed - i.e., script loaded from untrusted source. If it still does
not work for you, please post a test case here and/or file a bug with a
Post by Krueger, Simon
I cannot get the example at https://wiki.openjdk.java.net/display/Nashorn/Nashorn+script+security+permissions to work. Specifically, I cannot seem to get the permissions for the test.js to apply. The permissions of the .jar that loads the test.js will work. This seems to be a bug. Can anyone else verify if it is working for them or not?