• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic