Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AccessControlException in writing to a file in an Applet  RSS feed

 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Its been longtime i have done any Applet Programming except in our graduation course.

I have been just helping out my friend who got an assignment to write the values of the textbox present in the applet into a file.

But i am getting an error like this.



I have googled for the same and found out one solution in the Sun's TechTips wherein they have told about SecurityManager and to have a .policy file in the same folder which has a line like



But it does not seem to be working fine. Still i do get the same error. Am i missing something?
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any one who can help me out here?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets can't do file I/O for security reasons. The two ways around that are signing the applet, or altering the local security policy. Both are described in http://faq.javaranch.com/java/HowCanAnAppletReadFilesOnTheLocalFileSystem
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ulf for the links
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!