• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Do I really need to sign a simple applet?

Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have an applet that reads from a text file (same directory), and I've run into the security error.

I've been looking into signing it through the links on this site, but I really do not understand it. One website seemed to say that the applet can access files in its own directory. (Mine can't.) Do you need to sign it even if it's only trying to access its own directory?

The other thing I ran into was requesting a certificate file from someone. Do you have to do that for an unofficially signed applet that requests permission from the user?

Sorry about the common question, I know there's a lot of information on the sites linked to from here. I just don't get it, and would appreciate a little push .
Posts: 43026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Applets can access all files on the same server that they are served from, not just from their own directory; they don't need to be signed in order to do that. What unsigned applets can't do is use anything based on File objects - like the FileInputStream and FileReader classes.

See the HelloServerFile in the CodeBarn for an example of how to do this: http://faq.javaranch.com/java/CodeBarnApplets
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic