I am trying to reproduce an API for executing Java (like ideone.com has), but so far I'm having a lot of difficulties running Java sandboxed (SELinux sandbox doesn't work).
I've heard about the SecurityManager, but I'm trying to figure out what's the easiest way to run Java code in a sandbox (kind of like a Java applet running in the browser), instead of writing my own jail server using the SecurityManager.
You might want to take a look at the java-sandbox project [1] which aims at providing a simple interface to execute untrusted code.
[1] http://blog.datenwerke.net/p/the-java-sandbox.html
The SecurityManager is designed for this purpose. You'll need to create a policy file to restrict access, as described here: Policy Files, then enable it at runtime for just the code you're trying to sandbox.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With