An alternative Java sandbox based on bytecode rewrite