Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in IO operation in java plugin

 
amit vishnoi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx,
That means I have to ask my clients to migrate from MVM to java plug-in.One more problem I am facing with java plugin access problem
I am using following version of VM
Plug-in: Version 1.4.1_07
Using JRE version 1.4.1_07 Java HotSpot(TM) Client VM
Although I have signed my applet and also given explisit permission for fileIO in code like
.............
if(System.getProperty("java.vendor").indexOf("Microsoft") != -1)
{
try
{
System.out.println("I am assigning permission");
PolicyEngine.assertPermission(PermissionID.NETIO);
PolicyEngine.assertPermission(PermissionID.FILEIO);
PolicyEngine.assertPermission(PermissionID.SYSTEM);
}
catch(Throwable e)
{
System.out.println("some exception in asserting permission");
e.printStackTrace();
}
}
else if((System.getProperty("java.vendor").indexOf("Netscape") != -1) ||
(System.getProperty("java.vendor").indexOf("Apple") != -1) ||
(System.getProperty("java.vendor").indexOf("Sun") != -1))
{
try
{
PrivilegeManager.enablePrivilege("UniversalFileAccess");
}
catch(Throwable e)
{
}
}
............
But still it giving me following error on file reading......
access denied (java.io.FilePermission -------------------
But If i grant permission in the policy file in following manner
grant
{
permission java.security.AllPermissions;
permission java.io.FilePermission
"E://pgp//My Testing//keyparse//privatefile", "read,write";
};
But i dont find this very impressive because i have to ask my clients specifcally for granting permission to do there specific file.
As above mentioned above granting permission in applet code.Although I tried it for sun vendor but its not working.
Please suggest....
Thanks and Best Regards
Amit Vishnoi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic