![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e220. Managing Policy FilesBy default, the JDK uses the policy files located infile:${java.home}/lib/security/java.policy file:${user.home}/.java.policyThese policy files are specified in the default security file: ${java.home}/lib/security/java.securityThe final policy is the union of all granted permissions in all policy files. To specify an additional policy file, you can set the java.security.policy system
property at the command line:
> java -Djava.security.manager -Djava.security.policy=someURL MyApp or > appletviewer -J-Djava.security.policy=someURL HTMLfileTo ignore the policies in the java.security file,
and only use the specified policy, use `== ' instead of `= ':
> java -Djava.security.manager -Djava.security.policy==someURL MyAppAdditional policy files can also be added to the java.security file.
For more information on policy files, see
http://java.sun.com/j2se/1.4/docs/guide/security/PolicyFiles.html
e221. Protecting Files e222. Protecting System Properties
© 2002 Addison-Wesley. |