Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : Java : Education - Tutorials
Java security, Part 2: Authentication and authorization
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
5. JAAS example
  


Running the example page 2 of 8


The JAASExample application is designed to show several authentication and authorization techniques and the impact of some configuration settings. Start running the example with the following statement, which you'll find in the file run.bat in the tutorial source file (see JavaSecurity2-source.jar).

 java -Djava.security.manager
-Djava.security.auth.login.config==login.config
-Djava.security.policy==jaas.policy JAASExample 

The statement instructs the system's default security manager to use a login configuration file called login.config, to use a security policy file called jaas.policy, and, finally, to run the main application program JAASExample. Note that the double equals sign (==) indicates that the system default login configuration and policy files should not be added to the ones we've listed here. A single equals sign (=) would indicate the file should be concatenated with the system default.


Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact