1 package test; 2 3 class Test7 { 4 public static void main(String [] args) throws Exception { 5 System.setSecurityManager(new SecurityManager () { 6 public void checkAccess(ThreadGroup g) { 7 System.out.println("checkAccess(" + g + ")"); 8 throw new SecurityException ("no"); 9 } 11 }); 12 Thread t = new Thread ( 13 new Runnable () { 14 public void run() { 15 System.out.println("bla"); 16 } 17 } 18 ); 19 t.start(); 20 t.join(); 21 } 22 } | Popular Tags |