File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Digitally Signing Applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Digitally Signing Applets" Watch "Digitally Signing Applets" New topic

Digitally Signing Applets

Lance Walker

Joined: Mar 09, 2009
Posts: 23
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!
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403

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.

Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
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.
I agree. Here's the link:
subject: Digitally Signing Applets
It's not a secret anymore!