We do it everyday with Javascript in the browser, on, like, 10 orders of magnitude bigger frequency than we ever run Java Apples and Flash. The whole web commerce, banking, b2b, etc. depend on it. Imagine that, huh?
Is that enough snark?
Not to mention, if your problem is container breaking out, you have way way bigger problems that shell-script containers.