Is there a framework or api to let multiple isolated sandboxes run in a single java vm?
Under the Sun/Oracle implementation of the Java library, if you want to sandbox what might loosely be called "GUIs" then you need to use the non-standard, undocumented and unsupported sun.awt.AppContext
API.
Other than using APIs involved in that sort of mess, you just need to keep separate ClassLoader
s and perhaps Thread
/ThreadGroup
s.
There was a JSR for "isolates", but nothing has come of that as yet.