View Javadoc

1   package no.feide.mellon.jaas.application;
2   
3   import java.security.AccessControlException;
4   
5   /***
6    * @author Rikke Amilde Løvlid.
7    * 
8    * This is how you run it:
9    * java -Djava.security.auth.login.config==jaas.config \
10   * 		-Djava.security.manager \
11   * 		-Djava.security.policy==jaas.policy \
12   * 		Login \
13   * 		Demo \
14   *		args
15   *
16   * As you see this application need to be spesified as the argument of the Login class.
17   */
18  public class Demo{
19  	
20  	public static void main(String[] args){
21  		try{
22  			System.out.println("\t\tYour user.home property value is: " + System.getProperty("user.home"));
23  		}
24  		catch(AccessControlException ace){
25  			System.out.println("\t\tYou don't have permission to read the user.home value");
26  		}
27  		try{
28  			System.out.println("\t\tYour java.home property value is: " + System.getProperty("java.home"));
29  		}
30  		catch(AccessControlException ace){
31  			System.out.println("\t\tYou don't have permission to read the java.home value");
32  		}
33  	}
34  }