简体   繁体   中英

Entries in .java.policy ignored

I'm developing a JAVA Applet that requires read and write access to a folder. When I add the following entry into the java.policy file within the JRE folder it works:

 permission java.io.FilePermission "${user.home}${/}logtest${/}-", "read, write";

However if I add the entry in the .java.policy file within the users home directory it does not work.

Investigating further I add another policy file mytest.policy containing the exact same permission above and modified java.security file with:

policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy
policy.url.3=file:${user.home}/mytest.policy

The permissions are successfully applied.

Does anyone know why .java.policy permission entries don't work?

尝试编辑文件C:\\ Users \\ USERNAME \\ AppData \\ LocalLow \\ Sun \\ Java \\ Deployment \\ deployment.properties并添加到文件的下一行:deployment.security.use.user.home.java.policy = true

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM