Skip navigation.

Mr Green's Coffeshop

Heal the world, smoke weed!

Signing JAR files.

, ,

In order to get access to the filesystem all jar files in an application must be signed if it is started via Java Web Start or if it is an Applet.

First step is generating a keypair with the keytool.

/usr/lib/j2sdk1.5-sun/bin/keytool -genkey -alias green -keypass greenpass


green is the alias for the keypair, and greenpass is the password to access that alias(or keypair). The keypair will be stored in the file .keystore in your homedirectory unless you specify otherwise.

You'll be asked a lot of questions, you may lie or just hit enter!

Create a self-signed certificate:
/usr/lib/j2sdk1.5-sun/bin/keytool -selfcert -alias green



After the keypair has been genereated the jar file can be signed with jarsigner:

In it's easiest form, jarsigner's syntax:
jarsigner jarfile alias

/usr/lib/j2sdk1.5-sun/bin/jarsigner JWSTest.jar green


It will ask for both passwords specified while generating the keys.

The jar file has now been signed ;)

New harddisk.Java Web Start

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

December 2009
M T W T F S S
November 2009January 2010
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31