java - Nashorn NullPointerException with SecurityManager -



java - Nashorn NullPointerException with SecurityManager -

i creating sandbox programme nashorn js interpreter, , using minimalist security manager restrict can do. problem when phone call engine.eval(reader) null pointer exception. know reader works because able print entire file, letter-by-letter. know permissions issue because if add together allpermissions works. permissions need run script in nashorn?

apparently messed initial tests, it's not file reader, happens when hard-code string.

i found problem. apparently need permission run nashorn:

java.io.filepermission, "/usr/lib/jvm/java-8-openjdk/jre/lib/ext/nashorn.jar", "read"

java javascript permissions securitymanager nashorn

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -