Este contenido no está disponible en el idioma seleccionado.
2.3. Write a Java Security Policy
An application called
policytool
is included with most JDK and JRE distributions, for the purpose of creating and editing Java security policies. Detailed information about policytool
is linked from http://docs.oracle.com/javase/6/docs/technotes/tools/. Alternatively, you can also write a security policy using a text editor.
Procedure 2.1. Setup a new Java Security Manager Policy
Start
policytool
.Start thepolicytool
tool in one of the following ways.Red Hat Enterprise Linux
From your GUI or a command prompt, run/usr/bin/policytool
.Microsoft Windows Server
Runpolicytool.exe
from your Start menu or from thebin\
of your Java installation. The location can vary.
Create a policy.
To create a policy, select. Add the parameters you need, then click .Note
Use VFS to specify paths for applications deployed on JBoss EAP. On Linux the path is:vfs:/content/application.war
. On Microsoft Windows it is:vfs:/${user.dir}/content/application.war
.
For example:grant codeBase "vfs:/content/application.war/-" { permission java.util.PropertyPermission "*", "read"; };
Edit an existing policy
Select the policy from the list of existing policies, and select thebutton. Edit the parameters as needed.Delete an existing policy.
Select the policy from the list of existing policies, and select thebutton.