• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help Making a Trusted Applet?

 
Seth Friedman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone help me out here? I need to write a file to a machine with an applet, so obviously, I need a trusted applet. I found some links to help me out ( http://www.captain.at/programming/java/ ), and I followed all the steps, the certificate was made, etc. I ran the HTML file and accepted my certificate, but afterwards, I got a General Exception, which turned out to be a java.lang.SecurityException, that my signer information didn't match some of the other signer information of classes I used. It lists all the classes, both mine and Java's, that there were conflicts with, I guess.

Somebody gave me some code that he said helped him:


He didn't say where to put it, so I put it in start() (and I don't know if that's right or wrong). But now instead, I get:
exception: java.security.AccessControlException: access denied (java.util.PropertyPermission java.home read).
I really have never dealt with security, or permissions, or trusted applets, etc. Can somebody tell me what code I need, or if I need to throw an exception or anything like that?
Thanks!

Oh, also, are browser securities or anything like that an issue? I'm on IE here, but I have Firefox at home, if that might make a difference.
[ May 26, 2006: Message edited by: Seth Friedman ]
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

I'm not sure how that piece of code would be useful. An applet can't grant itself permissions - that's the point of the applet sandbox, that permissions need to be granted externally. The two principal ways of giving permissions to applets are described in this wiki page. See if that makes sense to you, and come back here with any questions you may have.
 
Seth Friedman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I inserted the code from that page, but I still have the same problem. Did the page from before have me create the certificate wrong? The way of doing it based on that page was different.

I just realized that I wasn't paying much attention. I don't have any security-sensitive issues yet, to the best of my knowledge. I'm not going to put in my FileReader until I get this running, because I know there's no point to. I do make calls to System, but I don't think that that's the problem (is it?). That's the only thing I could think of...
[ May 30, 2006: Message edited by: Seth Friedman ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic