edu.pdx.cs399J.security
Class PrintUser

java.lang.Object
  extended by edu.pdx.cs399J.security.PrintUser

public class PrintUser
extends Object

This class demonstrates SecurityManagers and Permissions by attempting to access the user.name system property.

This code should be run in three different modes:

  1. With no security enabled
  2. With the default (applet level) security manager: -Djava.security.manager
  3. With the a policy file containing the following permissions:
     grant {
       permission java.util.PropertyPermission "user.home", "read";
     };
     


Constructor Summary
PrintUser()
           
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintUser

public PrintUser()
Method Detail

main

public static void main(String[] args)


Copyright © 2000-2009 Portland State University. All Rights Reserved.