Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simplifying Signed Applets?

 
Siegfried Heintze
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After a great deal of trouble, I finally got the example at http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html to work in applet viewer.

(1) Do IE and Netscape/Firefox use %HOMEDRIVE%%HOMEPATH%/.java.policy on windows?
(2) If %HOMEDRIVE%%HOMEPATH%/.java.policy specifies the keystore, why does the above example use Write.jp? Is this not redundant? How would we specify Write.jp for IE or Netscape/firefox?
(3) Must all my users use the policytool.exe (or, worse yet, notepad) to create or edit the .java.policy file? This seems like it would be a bit much to ask of the casual user. Is there a way to simplify this? ActiveX controls like the flash player don't require nearly so much of the user.
(4) What is the syntax for the .java.policy file? Does it use forward or backward slashs on windows? Does it expand environment variables like %HOMEDRIVE%%HOMEPATH% or do I use the java style ${user.home} or do I use the linux style ${HOME}?

Thanks,
Siegfried
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a particular reason you want users to fiddle around with their local policy files? As you said, that's tricky business. Have you considered signing the applet instead?
 
Siegfried Heintze
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess I need help understanding applet signing. In the sun tutorial at http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html, they had me sign the jar file (in the role of the applet developer) and also fiddle with the policytool.exe (in the role of the user called Ray).

Is the tutorial wrong or did I misunderstand that tutorial? Ray is the guy running the browser or applet viewer and he has to run the policy tool. I cannot imagine the average user of amazon.com, for example, going thru that much trouble to use the amazon.com site.

Can someone point me to a signing tutorial that does not require the user to run policytool or create a policy and works with IE and Firefox and appletviewer?

Thanks,
Siegfried
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the guy doing all of that stuff is the programmer who puts the applet up on the web. Once you've done all that ugly stuff, you just put the applet into your website. Programmers are expected to be able to deal with that sort of thing.

When a user downloads your applet and tries to run it, he will be shown a box which says that you have signed it and that your signing authority is whoever you said it was when you did the signing process. The user can then decide whether to trust your applet or not, and then clicks the "OK" or "Hell No" box depending on his choice.

Signed applets work just fine with all the main browsers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic