如何提供访问权限的小程序文件系统上写 [英] how to provide access permission for applet to write on file system
问题描述
我在applet.I政策文件的设置问题,我做这一次,不知道如何设置策略文件的小程序java.Actually我想给权限的小程序上写文件系统。为此我将不得不放弃文件权限的小程序
I have problem in setup of policy file for applet.I am doing this first time and don't know how to set the policy file for applet in java.Actually I want to give the permission to the applet to write on the file system. for Which I will have to give file permission to the applet
于是我做出的.java.policy文件命名,并把下面的code在它
So I make a file named .java.policy and and put the following code in it
grant codeBase "file:/C://res/applet/*" {
permission java.io.FilePermission "C:\\res\\applet\\test.txt", "read, write";
};
和它保存在用户\\文件夹金达莱现在我设置JAVA_HOME为
C:\\用户\\金达莱
and save this in users\jindal folder now i set the JAVA_HOME as c:\users\jindal
但我仍然发现异常
java.security.AccessControlException:
访问被拒绝(java.io.FilePermission中
C:\\ RES \\小程序\\ test.txt的写入)
java.security.AccessControlException: access denied (java.io.FilePermission C:\res\applet\test.txt write)
任何机构可以请帮助什么是错的或者是我应该做的。
can any body please help what is wrong or what should i do
推荐答案
请访问以下链接签名的小程序
Please Go to The below link for Signing applet
http://java.sun.com/developer/onlineTraining/编程/ JDCBook / signed.html
这篇关于如何提供访问权限的小程序文件系统上写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!