Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Digitally Signing Applets

Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm very new to both java and making applets, so please bear with me.

I need to digitally sign an applet so that it can read and write files on the local system. The applet downloads a file that the user selects and then the user can also upload files to a server.

However, I have absolutely no idea how to go about doing this, and everything that I've read so far is pretty cryptic and gets far to technical for my level of understanding. So far I've looked at and its references, and tried searching google for a simple tutorial.

Could anyone please define that steps that are necessary to signing an applet, or point me in the right direction? Also, I'm developing the applet on in the Eclipse IDE, so if there is a way to sign applets within eclipse, that would be fantastic .

Thanks in advance for any help!
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You need to get a signature ID from one of the various companies that
distribute them. What this gives you is a private key and a public
key. You sign your applets with the private key and give out your
public key so that everyone else can decrypt your private key.
Attached is a URL for one such company:

brief steps for signing a java applet:
1) you develop applet
2) get signature ID from above URL
3) use private key to sign your applet
4) clients get your public key and enter it in their database
5) run applet

To generate a key, use the below java command from command prompt/console

keytool -genkey -alias ujjwal -keyalg -RSA

After this, you will need a digital certificate, if you are looking for free certificates then you will find many site offering free certificates on google.
Posts: 43016
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that for development purposes you can also generate your own certificate (step 2 in Ujjwal's list) instead of getting an official one. That's done using the "keytool" executable that comes with the JDK; the process is described in the articles linked in that FAQ page.
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic