• 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

Simplifying Signed Applets?

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic