Thanks Mayer it helped me , now I am able to create custom policy file .
But may i know please how can i link that custom policy file to wildfly 10 configuration? I have placed custom policy file in JBOSS_HOME directory and given the below options in standalone.conf.bat file:
set "JAVA_OPTS=%JAVA_OPTS% -Djava.security.policy==$JBOSS_HOME/customServer.policy"
It is not listening my customServer.policy file configuration .
Apparently there are some typos in the above command. I think for Windows it should look like
set "JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy=%JBOSS_HOME%\customServer.policy"
Please see also Default Policy Implementation and Policy File Syntax for more details
I tried running following command getting following error :
Setting JAVA property to "C:\Program Files\Java\jdk1.8.0_121\bin\java"
ERROR: The use of -Djava.security.manager has been removed. Please use the -secmgr command line argument or SECMGR=true environment variable.