• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do I really need to sign a simple applet?

 
Nathan Popham
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

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 .
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic