I just started to use the Java ScriptEngine to do little extensions to my Application then i noticed that i can import all the java classes in the script and use them without restrictions. Is there a way to specify what classes a script can use? I dont want them to do things like java.lang.System.exit(1);
views:
111answers:
2
+1
A:
Well, you seem to need to learn about the Java SecurityManager. That's a pretty large topic, you might want to read up on it and then post a more specific question if you have trouble making it work for you.
bmargulies
2009-12-10 02:04:30
SecuritiyManager sounds good i will look at it. Do you have any hints for me where to start on this big topic?
Exception
2009-12-10 13:18:00
A:
Use the Java Security Manager. Refer this answer for an example.
instantsetsuna
2010-09-07 07:16:33