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

How can I get an applet to write to a client file

 
Chong Kim
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've modified the .java.policy file to read:

grant codebase "http://pckim.us.com:8600/html.* {
permission java.io.FilePermission "<<ALL FILES>>", "write";
};
I wrote an applet that writes to a file on my client machine but when I run it in Netscape I'm getting a "security checkfile" error. I was led to believe that all I had to do was modify the .java.policy file. Am I missing something here? Please help. Thank you.
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know much about security policies, but I do know they were introduced in jdk1.2.
Are you using the stock JVM plug-in for Netscape? If so, it doesn't know anything about security policy files, etc. You'll have to use the Sun JVM plug-in to get up to the 1.3 version.
Rob
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also have to digitally sign the applet. It's a rather nasty process, I'm afraid, and for some good (and a few not-so-good) reasons.
Fair warning. I'd guess that 90% of the time people are trying to do local file I/O it's because they're trying to force an applet to behave like an application. Local storage of data is something I only recommend if the machine is expected to be offline when the data's needed - from a business perspective, it's actually preferable to keep stuff on the server, where downtime is generally lower, it's more likely to be backed up, and it can be made available on another machine if yours is currently belching smoke.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Phil,
Your chosen name here at the Ranch is not a valid one. We require first name + space + last name because we want to keep the Ranch professional. Please read our naming policy here and re-register with a valid name.
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic