11.2.09

Signing Jar Files

Compared to most Java programmers, I can still call myself a newbie.

I just learned how to sign java jars to be able to maximize the potential of applets.

1.) First of all you need to create your keystore. A keystore file (usually named .keystore in your home directory) contains your private and public keys. .keystore is stored in a binary jks format (Java Key Store) similar to PKCS #12 containing both public and private keys, protected by a passphrase. The first four signature bytes of a Sun .keystore file in hex are FEEDFEED. ( http://mindprod.com/jgloss/keystore.html)

    To create your keystore, you need the keytool which you can get with most java jdk. At the command line, you type something:

    keytool –genkey –alias alias_to_be_used

    you need to specify alias_to_be_used as this will be the alias that you will be using for the jarsigner command later.

2.) You can save your .keystore file if you are going to transfer to other machines or reformat the machine that you are going to be using. You just have to remember to put it at your home directory.

3.) You can now create your jar file. After which you can issue the command:

    jarsigner –storepass yourpassword –keypass yourpassword jarfile.jar alias_to_be_used

     you have to specify yourpassword for both the storepass and keypass as they could be different passwords (as you will be prompted in the keytool to be able to do so). Also don’t forget to change jarfile.jar for the filename of your jarfile and alias_to_be_used for the alias you supplied to keytool.

4.) That’s it you have a jar signed file.

Enough for now, back to work...

3.2.09

Now: Java

Hi,

It's been a while since I posted here and a lot of things happened already. Tonight, I will be posting of a different thing as I have been re-learning JAVA. Yes, the old programming paradigm that I once rubbed off my shoulder was once again at the doorsteps, knocking at ME to learn about it.

Now that JAVA is OpenSource, I am still a bit skeptic about what can be done with it.

There must be a reason why I am now shifting most of my time to JAVA and not with Python,PHP and C++ which is what I commonly use.

Just to keep you hanging and of course, not to spoil the company's plan, I would not discuss the details of what I have been doing the last 2 months. I have a month more of development for this so I'm going to keep my fingers shut until it is the time to divulge the great secret.

After which, I will be blogging about the pain, the hardships and all the fuzz that happened before, during and after development.

Thanks for reading.